Skip to content

Commit

Permalink
Adding PS Table role def/assignment commands
Browse files Browse the repository at this point in the history
  • Loading branch information
etcriss committed Dec 4, 2024
1 parent 31b4221 commit a67c284
Show file tree
Hide file tree
Showing 21 changed files with 3,445 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -461,5 +461,236 @@ public partial interface ITableResourcesOperations
/// </exception>
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<BackupInformation>> BeginRetrieveContinuousBackupInformationWithHttpMessagesAsync(string resourceGroupName, string accountName, string tableName, ContinuousBackupRestoreLocation location, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));


/// <summary>
/// Retrieves the properties of an existing Azure Cosmos DB Table Role Definition
/// with the given Id.
/// </summary>
/// <remarks>
/// Retrieves the properties of an existing Azure Cosmos DB Table Role Definition
/// with the given Id.
/// </remarks>
/// <param name='roleDefinitionId'>
/// The GUID for the Role Definition.
/// </param>
/// <param name='resourceGroupName'>
/// The name of the resource group. The name is case insensitive.
/// </param>
/// <param name='accountName'>
/// Cosmos DB database account name.
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="Microsoft.Rest.Azure.CloudException">
/// Thrown when the operation returned an invalid status code
/// </exception>
/// <exception cref="Microsoft.Rest.SerializationException">
/// Thrown when unable to deserialize the response
/// </exception>
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<TableRoleDefinitionGetResults>> GetTableRoleDefinitionWithHttpMessagesAsync(string roleDefinitionId, string resourceGroupName, string accountName, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));

/// <summary>
/// Creates or updates an Azure Cosmos DB Table Role Definition.
/// </summary>
/// <remarks>
/// Creates or updates an Azure Cosmos DB Table Role Definition.
/// </remarks>
/// <param name='roleDefinitionId'>
/// The GUID for the Role Definition.
/// </param>
/// <param name='resourceGroupName'>
/// The name of the resource group. The name is case insensitive.
/// </param>
/// <param name='accountName'>
/// Cosmos DB database account name.
/// </param>
/// <param name='createUpdateTableRoleDefinitionParameters'>
/// The properties required to create or update a Role Definition.
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="Microsoft.Rest.Azure.CloudException">
/// Thrown when the operation returned an invalid status code
/// </exception>
/// <exception cref="Microsoft.Rest.SerializationException">
/// Thrown when unable to deserialize the response
/// </exception>
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<TableRoleDefinitionGetResults>> CreateUpdateTableRoleDefinitionWithHttpMessagesAsync(string roleDefinitionId, string resourceGroupName, string accountName, TableRoleDefinitionCreateUpdateParameters createUpdateTableRoleDefinitionParameters, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));

/// <summary>
/// Deletes an existing Azure Cosmos DB Table Role Definition.
/// </summary>
/// <remarks>
/// Deletes an existing Azure Cosmos DB Table Role Definition.
/// </remarks>
/// <param name='roleDefinitionId'>
/// The GUID for the Role Definition.
/// </param>
/// <param name='resourceGroupName'>
/// The name of the resource group. The name is case insensitive.
/// </param>
/// <param name='accountName'>
/// Cosmos DB database account name.
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="Microsoft.Rest.Azure.CloudException">
/// Thrown when the operation returned an invalid status code
/// </exception>
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse> DeleteTableRoleDefinitionWithHttpMessagesAsync(string roleDefinitionId, string resourceGroupName, string accountName, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));

/// <summary>
/// Retrieves the list of all Azure Cosmos DB Table Role Definitions.
/// </summary>
/// <remarks>
/// Retrieves the list of all Azure Cosmos DB Table Role Definitions.
/// </remarks>
/// <param name='resourceGroupName'>
/// The name of the resource group. The name is case insensitive.
/// </param>
/// <param name='accountName'>
/// Cosmos DB database account name.
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="Microsoft.Rest.Azure.CloudException">
/// Thrown when the operation returned an invalid status code
/// </exception>
/// <exception cref="Microsoft.Rest.SerializationException">
/// Thrown when unable to deserialize the response
/// </exception>
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<System.Collections.Generic.IEnumerable<TableRoleDefinitionGetResults>>> ListTableRoleDefinitionsWithHttpMessagesAsync(string resourceGroupName, string accountName, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));

/// <summary>
/// Retrieves the properties of an existing Azure Cosmos DB Table Role Assignment
/// with the given Id.
/// </summary>
/// <remarks>
/// Retrieves the properties of an existing Azure Cosmos DB Table Role Assignment
/// with the given Id.
/// </remarks>
/// <param name='roleAssignmentId'>
/// The GUID for the Role Assignment.
/// </param>
/// <param name='resourceGroupName'>
/// The name of the resource group. The name is case insensitive.
/// </param>
/// <param name='accountName'>
/// Cosmos DB database account name.
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="Microsoft.Rest.Azure.CloudException">
/// Thrown when the operation returned an invalid status code
/// </exception>
/// <exception cref="Microsoft.Rest.SerializationException">
/// Thrown when unable to deserialize the response
/// </exception>
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<TableRoleAssignmentGetResults>> GetTableRoleAssignmentWithHttpMessagesAsync(string roleAssignmentId, string resourceGroupName, string accountName, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));

/// <summary>
/// Creates or updates an Azure Cosmos DB Table Role Assignment.
/// </summary>
/// <remarks>
/// Creates or updates an Azure Cosmos DB Table Role Assignment.
/// </remarks>
/// <param name='roleAssignmentId'>
/// The GUID for the Role Assignment.
/// </param>
/// <param name='resourceGroupName'>
/// The name of the resource group. The name is case insensitive.
/// </param>
/// <param name='accountName'>
/// Cosmos DB database account name.
/// </param>
/// <param name='createUpdateTableRoleAssignmentParameters'>
/// The properties required to create or update a Role Assignment.
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="Microsoft.Rest.Azure.CloudException">
/// Thrown when the operation returned an invalid status code
/// </exception>
/// <exception cref="Microsoft.Rest.SerializationException">
/// Thrown when unable to deserialize the response
/// </exception>
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<TableRoleAssignmentGetResults>> CreateUpdateTableRoleAssignmentWithHttpMessagesAsync(string roleAssignmentId, string resourceGroupName, string accountName, TableRoleAssignmentCreateUpdateParameters createUpdateTableRoleAssignmentParameters, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));

/// <summary>
/// Deletes an existing Azure Cosmos DB Table Role Assignment.
/// </summary>
/// <remarks>
/// Deletes an existing Azure Cosmos DB Table Role Assignment.
/// </remarks>
/// <param name='roleAssignmentId'>
/// The GUID for the Role Assignment.
/// </param>
/// <param name='resourceGroupName'>
/// The name of the resource group. The name is case insensitive.
/// </param>
/// <param name='accountName'>
/// Cosmos DB database account name.
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="Microsoft.Rest.Azure.CloudException">
/// Thrown when the operation returned an invalid status code
/// </exception>
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse> DeleteTableRoleAssignmentWithHttpMessagesAsync(string roleAssignmentId, string resourceGroupName, string accountName, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));

/// <summary>
/// Retrieves the list of all Azure Cosmos DB Table Role Assignments.
/// </summary>
/// <remarks>
/// Retrieves the list of all Azure Cosmos DB Table Role Assignments.
/// </remarks>
/// <param name='resourceGroupName'>
/// The name of the resource group. The name is case insensitive.
/// </param>
/// <param name='accountName'>
/// Cosmos DB database account name.
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="Microsoft.Rest.Azure.CloudException">
/// Thrown when the operation returned an invalid status code
/// </exception>
/// <exception cref="Microsoft.Rest.SerializationException">
/// Thrown when unable to deserialize the response
/// </exception>
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<System.Collections.Generic.IEnumerable<TableRoleAssignmentGetResults>>> ListTableRoleAssignmentsWithHttpMessagesAsync(string resourceGroupName, string accountName, System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.

namespace Microsoft.Azure.Management.CosmosDB.Models
{
using System.Linq;

/// <summary>
/// Parameters to create and update an Azure Cosmos DB SQL Role Assignment.
/// </summary>
[Microsoft.Rest.Serialization.JsonTransformation]
public partial class TableRoleAssignmentCreateUpdateParameters
{
/// <summary>
/// Initializes a new instance of the TableRoleAssignmentCreateUpdateParameters class.
/// </summary>
public TableRoleAssignmentCreateUpdateParameters()
{
CustomInit();
}

/// <summary>
/// Initializes a new instance of the TableRoleAssignmentCreateUpdateParameters class.
/// </summary>

/// <param name="roleDefinitionId">The unique identifier for the associated Role Definition.
/// </param>

/// <param name="scope">The data plane resource path for which access is being granted through this
/// Role Assignment.
/// </param>

/// <param name="principalId">The unique identifier for the associated AAD principal in the AAD graph to
/// which access is being granted through this Role Assignment. Tenant ID for
/// the principal is inferred using the tenant associated with the
/// subscription.
/// </param>
public TableRoleAssignmentCreateUpdateParameters(string roleDefinitionId = default(string), string scope = default(string), string principalId = default(string))

{
this.RoleDefinitionId = roleDefinitionId;
this.Scope = scope;
this.PrincipalId = principalId;
CustomInit();
}

/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();


/// <summary>
/// Gets or sets the unique identifier for the associated Role Definition.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "properties.roleDefinitionId")]
public string RoleDefinitionId { get; set; }

/// <summary>
/// Gets or sets the data plane resource path for which access is being granted
/// through this Role Assignment.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "properties.scope")]
public string Scope { get; set; }

/// <summary>
/// Gets or sets the unique identifier for the associated AAD principal in the
/// AAD graph to which access is being granted through this Role Assignment.
/// Tenant ID for the principal is inferred using the tenant associated with
/// the subscription.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "properties.principalId")]
public string PrincipalId { get; set; }
}
}
Loading

0 comments on commit a67c284

Please sign in to comment.