/// <summary>
 /// Lists all the userAssignedIdentities available under the specified
 /// ResourceGroup.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the Resource Group to which the identity belongs.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <Identity> > ListByResourceGroupAsync(this IUserAssignedIdentitiesOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Lists all the userAssignedIdentities available under the specified
 /// subscription.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <Identity> > ListBySubscriptionAsync(this IUserAssignedIdentitiesOperations operations, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListBySubscriptionWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Update an identity in the specified subscription and resource group.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the Resource Group to which the identity belongs.
 /// </param>
 /// <param name='resourceName'>
 /// The name of the identity resource.
 /// </param>
 /// <param name='parameters'>
 /// Parameters to update the identity
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <Identity> UpdateAsync(this IUserAssignedIdentitiesOperations operations, string resourceGroupName, string resourceName, Identity parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, resourceName, parameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     SystemAssignedIdentities = new SystemAssignedIdentitiesOperations(this);
     Operations             = new Operations(this);
     UserAssignedIdentities = new UserAssignedIdentitiesOperations(this);
     BaseUri        = new System.Uri("https://management.azure.com");
     ApiVersion     = "2021-09-30-preview";
     AcceptLanguage = "en-US";
     LongRunningOperationRetryTimeout = 30;
     GenerateClientRequestId          = true;
     SerializationSettings            = new JsonSerializerSettings
     {
         Formatting            = Newtonsoft.Json.Formatting.Indented,
         DateFormatHandling    = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling     = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     SerializationSettings.Converters.Add(new TransformationJsonConverter());
     DeserializationSettings = new JsonSerializerSettings
     {
         DateFormatHandling    = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling     = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     CustomInitialize();
     DeserializationSettings.Converters.Add(new TransformationJsonConverter());
     DeserializationSettings.Converters.Add(new CloudErrorJsonConverter());
 }
 /// <summary>
 /// Lists all the userAssignedIdentities available under the specified
 /// ResourceGroup.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the Resource Group to which the identity belongs.
 /// </param>
 public static IPage <Identity> ListByResourceGroup(this IUserAssignedIdentitiesOperations operations, string resourceGroupName)
 {
     return(operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Lists all the userAssignedIdentities available under the specified
 /// ResourceGroup.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 public static IPage <Identity> ListByResourceGroupNext(this IUserAssignedIdentitiesOperations operations, string nextPageLink)
 {
     return(operations.ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Lists all the userAssignedIdentities available under the specified
 /// subscription.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static IPage <Identity> ListBySubscription(this IUserAssignedIdentitiesOperations operations)
 {
     return(operations.ListBySubscriptionAsync().GetAwaiter().GetResult());
 }
 /// <summary>
 /// Deletes the identity.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the Resource Group to which the identity belongs.
 /// </param>
 /// <param name='resourceName'>
 /// The name of the identity resource.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAsync(this IUserAssignedIdentitiesOperations operations, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// Deletes the identity.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the Resource Group to which the identity belongs.
 /// </param>
 /// <param name='resourceName'>
 /// The name of the identity resource.
 /// </param>
 public static void Delete(this IUserAssignedIdentitiesOperations operations, string resourceGroupName, string resourceName)
 {
     operations.DeleteAsync(resourceGroupName, resourceName).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Gets the identity.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the Resource Group to which the identity belongs.
 /// </param>
 /// <param name='resourceName'>
 /// The name of the identity resource.
 /// </param>
 public static Identity Get(this IUserAssignedIdentitiesOperations operations, string resourceGroupName, string resourceName)
 {
     return(operations.GetAsync(resourceGroupName, resourceName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Update an identity in the specified subscription and resource group.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the Resource Group to which the identity belongs.
 /// </param>
 /// <param name='resourceName'>
 /// The name of the identity resource.
 /// </param>
 /// <param name='parameters'>
 /// Parameters to update the identity
 /// </param>
 public static Identity Update(this IUserAssignedIdentitiesOperations operations, string resourceGroupName, string resourceName, Identity parameters)
 {
     return(operations.UpdateAsync(resourceGroupName, resourceName, parameters).GetAwaiter().GetResult());
 }
Example #12
0
 /// <summary>
 /// Lists the associated resources for this identity.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <AzureResource> > ListAssociatedResourcesNextAsync(this IUserAssignedIdentitiesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListAssociatedResourcesNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Example #13
0
 /// <summary>
 /// Lists the associated resources for this identity.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 public static IPage <AzureResource> ListAssociatedResourcesNext(this IUserAssignedIdentitiesOperations operations, string nextPageLink)
 {
     return(operations.ListAssociatedResourcesNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
Example #14
0
 /// <summary>
 /// Lists the associated resources for this identity.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the Resource Group to which the identity belongs.
 /// </param>
 /// <param name='resourceName'>
 /// The name of the identity resource.
 /// </param>
 /// <param name='filter'>
 /// OData filter expression to apply to the query.
 /// </param>
 /// <param name='orderby'>
 /// OData orderBy expression to apply to the query.
 /// </param>
 /// <param name='top'>
 /// Number of records to return.
 /// </param>
 /// <param name='skip'>
 /// Number of records to skip.
 /// </param>
 /// <param name='skiptoken'>
 /// A skip token is used to continue retrieving items after an operation
 /// returns a partial result. If a previous response contains a nextLink
 /// element, the value of the nextLink element will include a skipToken
 /// parameter that specifies a starting point to use for subsequent calls.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <AzureResource> > ListAssociatedResourcesAsync(this IUserAssignedIdentitiesOperations operations, string resourceGroupName, string resourceName, string filter = default(string), string orderby = default(string), int?top = default(int?), int?skip = default(int?), string skiptoken = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListAssociatedResourcesWithHttpMessagesAsync(resourceGroupName, resourceName, filter, orderby, top, skip, skiptoken, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Example #15
0
 /// <summary>
 /// Lists the associated resources for this identity.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the Resource Group to which the identity belongs.
 /// </param>
 /// <param name='resourceName'>
 /// The name of the identity resource.
 /// </param>
 /// <param name='filter'>
 /// OData filter expression to apply to the query.
 /// </param>
 /// <param name='orderby'>
 /// OData orderBy expression to apply to the query.
 /// </param>
 /// <param name='top'>
 /// Number of records to return.
 /// </param>
 /// <param name='skip'>
 /// Number of records to skip.
 /// </param>
 /// <param name='skiptoken'>
 /// A skip token is used to continue retrieving items after an operation
 /// returns a partial result. If a previous response contains a nextLink
 /// element, the value of the nextLink element will include a skipToken
 /// parameter that specifies a starting point to use for subsequent calls.
 /// </param>
 public static IPage <AzureResource> ListAssociatedResources(this IUserAssignedIdentitiesOperations operations, string resourceGroupName, string resourceName, string filter = default(string), string orderby = default(string), int?top = default(int?), int?skip = default(int?), string skiptoken = default(string))
 {
     return(operations.ListAssociatedResourcesAsync(resourceGroupName, resourceName, filter, orderby, top, skip, skiptoken).GetAwaiter().GetResult());
 }