/// <summary> /// Creates or updates the specified subscription. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='subscription'> /// Subscription parameter. /// </param> /// <param name='newSubscription'> /// Subscription parameter. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <Subscription> CreateOrUpdateAsync(this ISubscriptionsOperations operations, string subscription, Subscription newSubscription, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(subscription, newSubscription, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Get the list of subscriptions. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='odataQuery'> /// OData parameters to apply to the operation. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IEnumerable <Subscription> > ListAsync(this ISubscriptionsOperations operations, ODataQuery <Subscription> odataQuery = default(ODataQuery <Subscription>), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListWithHttpMessagesAsync(odataQuery, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Retrieves the subscription's current quota information in a particular /// region. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='location'> /// The region in which to retrieve the subscription's quota information. You /// can find out which regions Azure Stream Analytics is supported in here: /// https://azure.microsoft.com/en-us/regions/ /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <SubscriptionQuotasListResult> ListQuotasAsync(this ISubscriptionsOperations operations, string location, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListQuotasWithHttpMessagesAsync(location, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Initializes client properties. /// </summary> private void Initialize() { Operations = new Operations(this); StreamingJobs = new StreamingJobsOperations(this); Inputs = new InputsOperations(this); Outputs = new OutputsOperations(this); Transformations = new TransformationsOperations(this); Functions = new FunctionsOperations(this); Subscriptions = new SubscriptionsOperations(this); BaseUri = new System.Uri("https://management.azure.com"); ApiVersion = "2016-03-01"; 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() } }; SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <Serialization>("type")); DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <Serialization>("type")); SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <InputProperties>("type")); DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <InputProperties>("type")); SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <OutputDataSource>("type")); DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <OutputDataSource>("type")); SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <FunctionProperties>("type")); DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <FunctionProperties>("type")); SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <FunctionBinding>("type")); DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <FunctionBinding>("type")); SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <FunctionRetrieveDefaultDefinitionParameters>("bindingType")); DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <FunctionRetrieveDefaultDefinitionParameters>("bindingType")); SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <ReferenceInputDataSource>("type")); DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <ReferenceInputDataSource>("type")); SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter <StreamInputDataSource>("type")); DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter <StreamInputDataSource>("type")); CustomInitialize(); DeserializationSettings.Converters.Add(new TransformationJsonConverter()); DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); }
/// <summary> /// Renames the subscription /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='body'> /// Subscription Name /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <RenamedSubscriptionId> RenameAsync(this ISubscriptionsOperations operations, SubscriptionName body, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.RenameWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// The operation to enable a subscription /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='subscriptionId'> /// Subscription Id. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task<EnabledSubscriptionId> EnableAsync(this ISubscriptionsOperations operations, string subscriptionId, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.EnableWithHttpMessagesAsync(subscriptionId, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } }
/// <summary> /// List all the subscriptions under a specified topic. /// <see href="https://msdn.microsoft.com/en-us/library/azure/mt639400.aspx" /> /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Name of the Resource group within the Azure subscription. /// </param> /// <param name='namespaceName'> /// The namespace name /// </param> /// <param name='topicName'> /// The topic name. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <SubscriptionInner> > ListByTopicAsync(this ISubscriptionsOperations operations, string resourceGroupName, string namespaceName, string topicName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByTopicWithHttpMessagesAsync(resourceGroupName, namespaceName, topicName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets all subscriptions for a tenant. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task<IPage<SubscriptionModel>> ListAsync(this ISubscriptionsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } }
/// <summary> /// Cancels the subscription /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <CanceledSubscriptionId> CancelAsync(this ISubscriptionsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CancelWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Creates a topic subscription. /// <see href="https://msdn.microsoft.com/en-us/library/azure/mt639385.aspx" /> /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Name of the Resource group within the Azure subscription. /// </param> /// <param name='namespaceName'> /// The namespace name /// </param> /// <param name='topicName'> /// The topic name. /// </param> /// <param name='subscriptionName'> /// The subscription name. /// </param> /// <param name='parameters'> /// Parameters supplied to create a subscription resource. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <SubscriptionInner> CreateOrUpdateAsync(this ISubscriptionsOperations operations, string resourceGroupName, string namespaceName, string topicName, string subscriptionName, SubscriptionInner parameters, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, namespaceName, topicName, subscriptionName, parameters, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets details about a specified subscription. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='subscriptionId'> /// The ID of the target subscription. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <SubscriptionModel> GetAsync(this ISubscriptionsOperations operations, string subscriptionId, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(subscriptionId, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets all available geo-locations. /// </summary> /// <remarks> /// This operation provides all the locations that are available for resource /// providers; however, each resource provider may support a subset of this /// list. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='subscriptionId'> /// The ID of the target subscription. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IEnumerable <Location> > ListLocationsAsync(this ISubscriptionsOperations operations, string subscriptionId, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListLocationsWithHttpMessagesAsync(subscriptionId, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Initializes a new instance of the ApiManagementClient class. /// </summary> /// <param name='httpClient'> /// The Http client /// </param> public ApiManagementClient(HttpClient httpClient) : base(httpClient) { this._apiOperationPolicy = new ApiOperationPolicyOperations(this); this._apiOperations = new ApiOperationsOperations(this); this._apiPolicy = new ApiPolicyOperations(this); this._apiProducts = new ApiProductsOperations(this); this._apis = new ApisOperations(this); this._authorizationServers = new AuthorizationServersOperations(this); this._certificates = new CertificatesOperations(this); this._groups = new GroupsOperations(this); this._groupUsers = new GroupUsersOperations(this); this._policySnippents = new PolicySnippetsOperations(this); this._productApis = new ProductApisOperations(this); this._productGroups = new ProductGroupsOperations(this); this._productPolicy = new ProductPolicyOperations(this); this._products = new ProductsOperations(this); this._productSubscriptions = new ProductSubscriptionsOperations(this); this._regions = new RegionsOperations(this); this._reports = new ReportsOperations(this); this._resourceProvider = new ResourceProviderOperations(this); this._subscriptions = new SubscriptionsOperations(this); this._tenantPolicy = new TenantPolicyOperations(this); this._userApplications = new UserApplicationsOperations(this); this._userGroups = new UserGroupsOperations(this); this._userIdentities = new UserIdentitiesOperations(this); this._users = new UsersOperations(this); this._apiVersion = "2014-02-14"; this._longRunningOperationInitialTimeout = -1; this._longRunningOperationRetryTimeout = -1; this.HttpClient.Timeout = TimeSpan.FromSeconds(300); }
/// <summary> /// List all the subscriptions under a specified topic. /// <see href="https://msdn.microsoft.com/en-us/library/azure/mt639400.aspx" /> /// </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 <SubscriptionInner> > ListByTopicNextAsync(this ISubscriptionsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByTopicNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// List all subscriptions of the Api Management service instance. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.ApiManagement.ISubscriptionsOperations. /// </param> /// <param name='resourceGroupName'> /// Required. The name of the resource group. /// </param> /// <param name='serviceName'> /// Required. The name of the Api Management service. /// </param> /// <param name='query'> /// Optional. /// </param> /// <returns> /// List Subscriptions operation response details. /// </returns> public static SubscriptionListResponse List(this ISubscriptionsOperations operations, string resourceGroupName, string serviceName, QueryParameters query) { return(Task.Factory.StartNew((object s) => { return ((ISubscriptionsOperations)s).ListAsync(resourceGroupName, serviceName, query); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// List all subscriptions of the Api Management service instance. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.ApiManagement.ISubscriptionsOperations. /// </param> /// <param name='nextLink'> /// Required. NextLink from the previous successful call to List /// operation. /// </param> /// <returns> /// List Subscriptions operation response details. /// </returns> public static SubscriptionListResponse ListNext(this ISubscriptionsOperations operations, string nextLink) { return(Task.Factory.StartNew((object s) => { return ((ISubscriptionsOperations)s).ListNextAsync(nextLink); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Creates new product subscription. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.ApiManagement.ISubscriptionsOperations. /// </param> /// <param name='resourceGroupName'> /// Required. The name of the resource group. /// </param> /// <param name='serviceName'> /// Required. The name of the Api Management service. /// </param> /// <param name='sid'> /// Required. Identifier of the subscription. /// </param> /// <param name='parameters'> /// Required. Create parameters. /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static AzureOperationResponse Create(this ISubscriptionsOperations operations, string resourceGroupName, string serviceName, string sid, SubscriptionCreateParameters parameters) { return(Task.Factory.StartNew((object s) => { return ((ISubscriptionsOperations)s).CreateAsync(resourceGroupName, serviceName, sid, parameters); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Initializes client properties. /// </summary> private void Initialize() { Namespaces = new NamespacesOperations(this); PrivateEndpointConnections = new PrivateEndpointConnectionsOperations(this); PrivateLinkResources = new PrivateLinkResourcesOperations(this); Operations = new Operations(this); DisasterRecoveryConfigs = new DisasterRecoveryConfigsOperations(this); MigrationConfigs = new MigrationConfigsOperations(this); Queues = new QueuesOperations(this); Topics = new TopicsOperations(this); Rules = new RulesOperations(this); Subscriptions = new SubscriptionsOperations(this); BaseUri = new System.Uri("https://management.azure.com"); ApiVersion = "2021-06-01-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> /// Initializes a new instance of the ApiManagementClient class. /// </summary> /// <param name='httpClient'> /// The Http client /// </param> public ApiManagementClient(HttpClient httpClient) : base(httpClient) { this._apiOperationPolicy = new ApiOperationPolicyOperations(this); this._apiOperations = new ApiOperationsOperations(this); this._apiPolicy = new ApiPolicyOperations(this); this._apiProducts = new ApiProductsOperations(this); this._apis = new ApisOperations(this); this._authorizationServers = new AuthorizationServersOperations(this); this._backends = new BackendOperations(this); this._certificates = new CertificatesOperations(this); this._groups = new GroupsOperations(this); this._groupUsers = new GroupUsersOperations(this); this._identityProvider = new IdentityProviderOperations(this); this._loggers = new LoggerOperations(this); this._openIdConnectProviders = new OpenIdConnectProvidersOperations(this); this._policySnippents = new PolicySnippetsOperations(this); this._productApis = new ProductApisOperations(this); this._productGroups = new ProductGroupsOperations(this); this._productPolicy = new ProductPolicyOperations(this); this._products = new ProductsOperations(this); this._productSubscriptions = new ProductSubscriptionsOperations(this); this._property = new PropertiesOperations(this); this._regions = new RegionsOperations(this); this._reports = new ReportsOperations(this); this._resourceProvider = new ResourceProviderOperations(this); this._subscriptions = new SubscriptionsOperations(this); this._tenantAccessGit = new TenantAccessGitOperations(this); this._tenantAccess = new TenantAccessInformationOperations(this); this._tenantConfiguration = new TenantConfigurationOperations(this); this._tenantConfigurationSyncState = new TenantConfigurationSyncStateOperation(this); this._tenantPolicy = new TenantPolicyOperations(this); this._userApplications = new UserApplicationsOperations(this); this._userGroups = new UserGroupsOperations(this); this._userIdentities = new UserIdentitiesOperations(this); this._users = new UsersOperations(this); this._userSubscriptions = new UserSubscriptionsOperations(this); this._apiVersion = "2016-10-10"; this._longRunningOperationInitialTimeout = -1; this._longRunningOperationRetryTimeout = -1; this.HttpClient.Timeout = TimeSpan.FromSeconds(300); }
/// <summary> /// Gets all subscriptions for a tenant. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static IPage <SubscriptionModel> List(this ISubscriptionsOperations operations) { return(operations.ListAsync().GetAwaiter().GetResult()); }
/// <summary> /// Creates new product subscription. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.ApiManagement.ISubscriptionsOperations. /// </param> /// <param name='resourceGroupName'> /// Required. The name of the resource group. /// </param> /// <param name='serviceName'> /// Required. The name of the Api Management service. /// </param> /// <param name='sid'> /// Required. Identifier of the subscription. /// </param> /// <param name='parameters'> /// Required. Create parameters. /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static Task <AzureOperationResponse> CreateAsync(this ISubscriptionsOperations operations, string resourceGroupName, string serviceName, string sid, SubscriptionCreateParameters parameters) { return(operations.CreateAsync(resourceGroupName, serviceName, sid, parameters, CancellationToken.None)); }
/// <summary> /// List all subscriptions of the Api Management service instance. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.ApiManagement.ISubscriptionsOperations. /// </param> /// <param name='nextLink'> /// Required. NextLink from the previous successful call to List /// operation. /// </param> /// <returns> /// List Subscriptions operation response details. /// </returns> public static Task <SubscriptionListResponse> ListNextAsync(this ISubscriptionsOperations operations, string nextLink) { return(operations.ListNextAsync(nextLink, CancellationToken.None)); }
/// <summary> /// Regenerates secindary key of existing subscription of the Api /// Management service instance. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.ApiManagement.ISubscriptionsOperations. /// </param> /// <param name='resourceGroupName'> /// Required. The name of the resource group. /// </param> /// <param name='serviceName'> /// Required. The name of the Api Management service. /// </param> /// <param name='sid'> /// Required. Identifier of the subscription. /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static Task <AzureOperationResponse> RegenerateSecondaryKeyAsync(this ISubscriptionsOperations operations, string resourceGroupName, string serviceName, string sid) { return(operations.RegenerateSecondaryKeyAsync(resourceGroupName, serviceName, sid, CancellationToken.None)); }
/// <summary> /// List all subscriptions of the Api Management service instance. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.ApiManagement.ISubscriptionsOperations. /// </param> /// <param name='resourceGroupName'> /// Required. The name of the resource group. /// </param> /// <param name='serviceName'> /// Required. The name of the Api Management service. /// </param> /// <param name='query'> /// Optional. /// </param> /// <returns> /// List Subscriptions operation response details. /// </returns> public static Task <SubscriptionListResponse> ListAsync(this ISubscriptionsOperations operations, string resourceGroupName, string serviceName, QueryParameters query) { return(operations.ListAsync(resourceGroupName, serviceName, query, CancellationToken.None)); }
/// <summary> /// Gets all subscriptions for a tenant. /// </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 <SubscriptionModel> ListNext(this ISubscriptionsOperations operations, string nextPageLink) { return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Cancels the subscription /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static CanceledSubscriptionId Cancel(this ISubscriptionsOperations operations) { return(operations.CancelAsync().GetAwaiter().GetResult()); }
/// <summary> /// Gets specific API of the Api Management service instance. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.ApiManagement.ISubscriptionsOperations. /// </param> /// <param name='resourceGroupName'> /// Required. The name of the resource group. /// </param> /// <param name='serviceName'> /// Required. The name of the Api Management service. /// </param> /// <param name='sid'> /// Required. Identifier of the subscription. /// </param> /// <returns> /// Get Subscription operation response details. /// </returns> public static Task <SubscriptionGetResponse> GetAsync(this ISubscriptionsOperations operations, string resourceGroupName, string serviceName, string sid) { return(operations.GetAsync(resourceGroupName, serviceName, sid, CancellationToken.None)); }
/// <summary> /// Deletes specific subscription of the Api Management service /// instance. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.ApiManagement.ISubscriptionsOperations. /// </param> /// <param name='resourceGroupName'> /// Required. The name of the resource group. /// </param> /// <param name='serviceName'> /// Required. The name of the Api Management service. /// </param> /// <param name='sid'> /// Required. Identifier of the subscription. /// </param> /// <param name='etag'> /// Required. ETag. /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static Task <AzureOperationResponse> DeleteAsync(this ISubscriptionsOperations operations, string resourceGroupName, string serviceName, string sid, string etag) { return(operations.DeleteAsync(resourceGroupName, serviceName, sid, etag, CancellationToken.None)); }
/// <summary> /// Renames the subscription /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='body'> /// Subscription Name /// </param> public static RenamedSubscriptionId Rename(this ISubscriptionsOperations operations, SubscriptionName body) { return(operations.RenameAsync(body).GetAwaiter().GetResult()); }
/// <summary> /// Deletes a subscription from the specified topic. /// <see href="https://msdn.microsoft.com/en-us/library/azure/mt639381.aspx" /> /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Name of the Resource group within the Azure subscription. /// </param> /// <param name='namespaceName'> /// The namespace name /// </param> /// <param name='topicName'> /// The topic name. /// </param> /// <param name='subscriptionName'> /// The subscription name. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task DeleteAsync(this ISubscriptionsOperations operations, string resourceGroupName, string namespaceName, string topicName, string subscriptionName, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, namespaceName, topicName, subscriptionName, null, cancellationToken).ConfigureAwait(false)).Dispose(); }