/// <summary> /// Gets an existing peering service with the specified name under the given /// 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. /// </param> /// <param name='peeringServiceName'> /// The name of the peering. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <PeeringService> GetAsync(this IPeeringServicesOperations operations, string resourceGroupName, string peeringServiceName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, peeringServiceName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Lists all of the peerings under the given 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 <PeeringService> > ListBySubscriptionAsync(this IPeeringServicesOperations operations, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListBySubscriptionWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Updates tags for a peering service with the specified name under the given /// 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. /// </param> /// <param name='peeringServiceName'> /// The name of the peering service. /// </param> /// <param name='tags'> /// Gets or sets the tags, a dictionary of descriptors arm object /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <PeeringService> UpdateAsync(this IPeeringServicesOperations operations, string resourceGroupName, string peeringServiceName, IDictionary <string, string> tags = default(IDictionary <string, string>), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, peeringServiceName, tags, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Initializes client properties. /// </summary> private void Initialize() { CdnPeeringPrefixes = new CdnPeeringPrefixesOperations(this); LegacyPeerings = new LegacyPeeringsOperations(this); Operations = new Operations(this); PeerAsns = new PeerAsnsOperations(this); PeeringLocations = new PeeringLocationsOperations(this); RegisteredAsns = new RegisteredAsnsOperations(this); RegisteredPrefixes = new RegisteredPrefixesOperations(this); Peerings = new PeeringsOperations(this); ReceivedRoutes = new ReceivedRoutesOperations(this); PeeringServiceCountries = new PeeringServiceCountriesOperations(this); PeeringServiceLocations = new PeeringServiceLocationsOperations(this); Prefixes = new PrefixesOperations(this); PeeringServiceProviders = new PeeringServiceProvidersOperations(this); PeeringServices = new PeeringServicesOperations(this); BaseUri = new System.Uri("https://management.azure.com"); ApiVersion = "2020-10-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() } }; CustomInitialize(); DeserializationSettings.Converters.Add(new TransformationJsonConverter()); DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); }
/// <summary> /// Creates a new peering service or updates an existing peering with the /// specified name under the given 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. /// </param> /// <param name='peeringServiceName'> /// The name of the peering service. /// </param> /// <param name='peeringService'> /// The properties needed to create or update a peering service. /// </param> public static PeeringService CreateOrUpdate(this IPeeringServicesOperations operations, string resourceGroupName, string peeringServiceName, PeeringService peeringService) { return(operations.CreateOrUpdateAsync(resourceGroupName, peeringServiceName, peeringService).GetAwaiter().GetResult()); }
/// <summary> /// Gets an existing peering service with the specified name under the given /// 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. /// </param> /// <param name='peeringServiceName'> /// The name of the peering. /// </param> public static PeeringService Get(this IPeeringServicesOperations operations, string resourceGroupName, string peeringServiceName) { return(operations.GetAsync(resourceGroupName, peeringServiceName).GetAwaiter().GetResult()); }
/// <summary> /// Lists all of the peerings under the given subscription. /// </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 <PeeringService> ListBySubscriptionNext(this IPeeringServicesOperations operations, string nextPageLink) { return(operations.ListBySubscriptionNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Lists all of the peering services under the given subscription and resource /// group. /// </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 <PeeringService> > ListByResourceGroupNextAsync(this IPeeringServicesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByResourceGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Lists all of the peerings under the given subscription. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static IPage <PeeringService> ListBySubscription(this IPeeringServicesOperations operations) { return(operations.ListBySubscriptionAsync().GetAwaiter().GetResult()); }
/// <summary> /// Lists all of the peering services under the given 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. /// </param> public static IPage <PeeringService> ListByResourceGroup(this IPeeringServicesOperations operations, string resourceGroupName) { return(operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult()); }
/// <summary> /// Updates tags for a peering service with the specified name under the given /// 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. /// </param> /// <param name='peeringServiceName'> /// The name of the peering service. /// </param> /// <param name='tags'> /// The resource tags. /// </param> public static PeeringService Update(this IPeeringServicesOperations operations, string resourceGroupName, string peeringServiceName, ResourceTags tags) { return(operations.UpdateAsync(resourceGroupName, peeringServiceName, tags).GetAwaiter().GetResult()); }
/// <summary> /// Deletes an existing peering service with the specified name under the given /// 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. /// </param> /// <param name='peeringServiceName'> /// The name of the peering service. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task DeleteAsync(this IPeeringServicesOperations operations, string resourceGroupName, string peeringServiceName, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, peeringServiceName, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Deletes an existing peering service with the specified name under the given /// 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. /// </param> /// <param name='peeringServiceName'> /// The name of the peering service. /// </param> public static void Delete(this IPeeringServicesOperations operations, string resourceGroupName, string peeringServiceName) { operations.DeleteAsync(resourceGroupName, peeringServiceName).GetAwaiter().GetResult(); }
/// <summary> /// Updates tags for a peering service with the specified name under the given /// 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. /// </param> /// <param name='peeringServiceName'> /// The name of the peering service. /// </param> /// <param name='tags'> /// Gets or sets the tags, a dictionary of descriptors arm object /// </param> public static PeeringService Update(this IPeeringServicesOperations operations, string resourceGroupName, string peeringServiceName, IDictionary <string, string> tags = default(IDictionary <string, string>)) { return(operations.UpdateAsync(resourceGroupName, peeringServiceName, tags).GetAwaiter().GetResult()); }