/// <summary> /// Creates or updates a resource type. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='providerNamespace'> /// The name of the resource provider hosted within ProviderHub. /// </param> /// <param name='resourceType'> /// The resource type. /// </param> /// <param name='properties'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ResourceTypeRegistration> CreateOrUpdateAsync(this IResourceTypeRegistrationsOperations operations, string providerNamespace, string resourceType, ResourceTypeRegistrationProperties properties = default(ResourceTypeRegistrationProperties), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(providerNamespace, resourceType, properties, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets a resource type details in the given subscription and provider. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='providerNamespace'> /// The name of the resource provider hosted within ProviderHub. /// </param> /// <param name='resourceType'> /// The resource type. /// </param> public static ResourceTypeRegistration Get(this IResourceTypeRegistrationsOperations operations, string providerNamespace, string resourceType) { return(operations.GetAsync(providerNamespace, resourceType).GetAwaiter().GetResult()); }
/// <summary> /// Creates or updates a resource type. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='providerNamespace'> /// The name of the resource provider hosted within ProviderHub. /// </param> /// <param name='resourceType'> /// The resource type. /// </param> /// <param name='properties'> /// </param> public static ResourceTypeRegistration CreateOrUpdate(this IResourceTypeRegistrationsOperations operations, string providerNamespace, string resourceType, ResourceTypeRegistrationProperties properties = default(ResourceTypeRegistrationProperties)) { return(operations.CreateOrUpdateAsync(providerNamespace, resourceType, properties).GetAwaiter().GetResult()); }
/// <summary> /// Gets the list of the resource types for the given provider. /// </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 <ResourceTypeRegistration> > ListByProviderRegistrationNextAsync(this IResourceTypeRegistrationsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByProviderRegistrationNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets the list of the resource types for the given provider. /// </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 <ResourceTypeRegistration> ListByProviderRegistrationNext(this IResourceTypeRegistrationsOperations operations, string nextPageLink) { return(operations.ListByProviderRegistrationNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Gets the list of the resource types for the given provider. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='providerNamespace'> /// The name of the resource provider hosted within ProviderHub. /// </param> public static IPage <ResourceTypeRegistration> ListByProviderRegistration(this IResourceTypeRegistrationsOperations operations, string providerNamespace) { return(operations.ListByProviderRegistrationAsync(providerNamespace).GetAwaiter().GetResult()); }
/// <summary> /// Deletes a resource type /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='providerNamespace'> /// The name of the resource provider hosted within ProviderHub. /// </param> /// <param name='resourceType'> /// The resource type. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task DeleteAsync(this IResourceTypeRegistrationsOperations operations, string providerNamespace, string resourceType, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.DeleteWithHttpMessagesAsync(providerNamespace, resourceType, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Deletes a resource type /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='providerNamespace'> /// The name of the resource provider hosted within ProviderHub. /// </param> /// <param name='resourceType'> /// The resource type. /// </param> public static void Delete(this IResourceTypeRegistrationsOperations operations, string providerNamespace, string resourceType) { operations.DeleteAsync(providerNamespace, resourceType).GetAwaiter().GetResult(); }