/// <summary> /// Gets a list of Custom Locations in the specified subscription and resource /// group. /// </summary> /// <remarks> /// Gets a list of Custom Locations in the specified subscription and resource /// group. The operation returns properties of each Custom Location. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. The name is case insensitive. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <CustomLocation> > ListByResourceGroupAsync(this ICustomLocationsOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Updates a Custom Location. /// </summary> /// <remarks> /// Updates a Custom Location with the specified Resource Name in the specified /// Resource Group and Subscription. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. The name is case insensitive. /// </param> /// <param name='resourceName'> /// Custom Locations name. /// </param> /// <param name='authentication'> /// This is optional input that contains the authentication that should be used /// to generate the namespace. /// </param> /// <param name='clusterExtensionIds'> /// Contains the reference to the add-on that contains charts to deploy CRDs /// and operators. /// </param> /// <param name='displayName'> /// Display name for the Custom Locations location. /// </param> /// <param name='hostResourceId'> /// Connected Cluster or AKS Cluster. The Custom Locations RP will perform a /// checkAccess API for listAdminCredentials permissions. /// </param> /// <param name='hostType'> /// Type of host the Custom Locations is referencing (Kubernetes, etc...). /// Possible values include: 'Kubernetes' /// </param> /// <param name='namespaceParameter'> /// Kubernetes namespace that will be created on the specified cluster. /// </param> /// <param name='provisioningState'> /// Provisioning State for the Custom Location. /// </param> /// <param name='tags'> /// Resource tags /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <CustomLocation> UpdateAsync(this ICustomLocationsOperations operations, string resourceGroupName, string resourceName, CustomLocationPropertiesAuthentication authentication = default(CustomLocationPropertiesAuthentication), IList <string> clusterExtensionIds = default(IList <string>), string displayName = default(string), string hostResourceId = default(string), string hostType = default(string), string namespaceParameter = default(string), string provisioningState = default(string), IDictionary <string, string> tags = default(IDictionary <string, string>), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, resourceName, authentication, clusterExtensionIds, displayName, hostResourceId, hostType, namespaceParameter, provisioningState, tags, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets a list of Custom Locations in a subscription. /// </summary> /// <remarks> /// Gets a list of Custom Locations in the specified subscription. The /// operation returns properties of each Custom Location /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <CustomLocation> > ListBySubscriptionAsync(this ICustomLocationsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListBySubscriptionWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Creates or updates a Custom Location. /// </summary> /// <remarks> /// Creates or updates a Custom Location in the specified Subscription and /// Resource Group /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. The name is case insensitive. /// </param> /// <param name='resourceName'> /// Custom Locations name. /// </param> /// <param name='parameters'> /// Parameters supplied to create or update a Custom Location. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <CustomLocation> BeginCreateOrUpdateAsync(this ICustomLocationsOperations operations, string resourceGroupName, string resourceName, CustomLocation parameters, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, resourceName, parameters, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Initializes client properties. /// </summary> private void Initialize() { CustomLocations = new CustomLocationsOperations(this); BaseUri = new System.Uri("https://management.azure.com"); ApiVersion = "2021-03-15-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> /// Gets a list of Custom Locations in the specified subscription and resource /// group. /// </summary> /// <remarks> /// Gets a list of Custom Locations in the specified subscription and resource /// group. The operation returns properties of each Custom Location. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. The name is case insensitive. /// </param> public static IPage <CustomLocation> ListByResourceGroup(this ICustomLocationsOperations operations, string resourceGroupName) { return(operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult()); }
/// <summary> /// Gets the list of Enabled Resource Types. /// </summary> /// <remarks> /// Gets the list of the Enabled Resource Types. /// </remarks> /// <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 <EnabledResourceType> > ListEnabledResourceTypesNextAsync(this ICustomLocationsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListEnabledResourceTypesNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets a Custom Location. /// </summary> /// <remarks> /// Gets the details of the customLocation with a specified resource group and /// name. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. The name is case insensitive. /// </param> /// <param name='resourceName'> /// Custom Locations name. /// </param> public static CustomLocation Get(this ICustomLocationsOperations operations, string resourceGroupName, string resourceName) { return(operations.GetAsync(resourceGroupName, resourceName).GetAwaiter().GetResult()); }
/// <summary> /// Gets a list of Custom Locations in a subscription. /// </summary> /// <remarks> /// Gets a list of Custom Locations in the specified subscription. The /// operation returns properties of each Custom Location /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static IPage <CustomLocation> ListBySubscription(this ICustomLocationsOperations operations) { return(operations.ListBySubscriptionAsync().GetAwaiter().GetResult()); }
/// <summary> /// Gets the list of Enabled Resource Types. /// </summary> /// <remarks> /// Gets the list of the Enabled Resource Types. /// </remarks> /// <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 <EnabledResourceType> ListEnabledResourceTypesNext(this ICustomLocationsOperations operations, string nextPageLink) { return(operations.ListEnabledResourceTypesNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Deletes a Custom Location. /// </summary> /// <remarks> /// Deletes the Custom Location with the specified Resource Name, Resource /// Group, and Subscription Id. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. The name is case insensitive. /// </param> /// <param name='resourceName'> /// Custom Locations name. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task BeginDeleteAsync(this ICustomLocationsOperations operations, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Gets a list of Custom Locations in the specified subscription and resource /// group. /// </summary> /// <remarks> /// Gets a list of Custom Locations in the specified subscription and resource /// group. The operation returns properties of each Custom Location. /// </remarks> /// <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 <CustomLocation> ListByResourceGroupNext(this ICustomLocationsOperations operations, string nextPageLink) { return(operations.ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Deletes a Custom Location. /// </summary> /// <remarks> /// Deletes the Custom Location with the specified Resource Name, Resource /// Group, and Subscription Id. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. The name is case insensitive. /// </param> /// <param name='resourceName'> /// Custom Locations name. /// </param> public static void BeginDelete(this ICustomLocationsOperations operations, string resourceGroupName, string resourceName) { operations.BeginDeleteAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); }
/// <summary> /// Lists all available Custom Locations operations. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static IPage <CustomLocationOperation> ListOperations(this ICustomLocationsOperations operations) { return(operations.ListOperationsAsync().GetAwaiter().GetResult()); }
/// <summary> /// Creates or updates a Custom Location. /// </summary> /// <remarks> /// Creates or updates a Custom Location in the specified Subscription and /// Resource Group /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. The name is case insensitive. /// </param> /// <param name='resourceName'> /// Custom Locations name. /// </param> /// <param name='parameters'> /// Parameters supplied to create or update a Custom Location. /// </param> public static CustomLocation BeginCreateOrUpdate(this ICustomLocationsOperations operations, string resourceGroupName, string resourceName, CustomLocation parameters) { return(operations.BeginCreateOrUpdateAsync(resourceGroupName, resourceName, parameters).GetAwaiter().GetResult()); }
/// <summary> /// Gets the list of Enabled Resource Types. /// </summary> /// <remarks> /// Gets the list of the Enabled Resource Types. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. The name is case insensitive. /// </param> /// <param name='resourceName'> /// Custom Locations name. /// </param> public static IPage <EnabledResourceType> ListEnabledResourceTypes(this ICustomLocationsOperations operations, string resourceGroupName, string resourceName) { return(operations.ListEnabledResourceTypesAsync(resourceGroupName, resourceName).GetAwaiter().GetResult()); }
/// <summary> /// Updates a Custom Location. /// </summary> /// <remarks> /// Updates a Custom Location with the specified Resource Name in the specified /// Resource Group and Subscription. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. The name is case insensitive. /// </param> /// <param name='resourceName'> /// Custom Locations name. /// </param> /// <param name='authentication'> /// This is optional input that contains the authentication that should be used /// to generate the namespace. /// </param> /// <param name='clusterExtensionIds'> /// Contains the reference to the add-on that contains charts to deploy CRDs /// and operators. /// </param> /// <param name='displayName'> /// Display name for the Custom Locations location. /// </param> /// <param name='hostResourceId'> /// Connected Cluster or AKS Cluster. The Custom Locations RP will perform a /// checkAccess API for listAdminCredentials permissions. /// </param> /// <param name='hostType'> /// Type of host the Custom Locations is referencing (Kubernetes, etc...). /// Possible values include: 'Kubernetes' /// </param> /// <param name='namespaceParameter'> /// Kubernetes namespace that will be created on the specified cluster. /// </param> /// <param name='provisioningState'> /// Provisioning State for the Custom Location. /// </param> /// <param name='tags'> /// Resource tags /// </param> public static CustomLocation Update(this ICustomLocationsOperations operations, string resourceGroupName, string resourceName, CustomLocationPropertiesAuthentication authentication = default(CustomLocationPropertiesAuthentication), IList <string> clusterExtensionIds = default(IList <string>), string displayName = default(string), string hostResourceId = default(string), string hostType = default(string), string namespaceParameter = default(string), string provisioningState = default(string), IDictionary <string, string> tags = default(IDictionary <string, string>)) { return(operations.UpdateAsync(resourceGroupName, resourceName, authentication, clusterExtensionIds, displayName, hostResourceId, hostType, namespaceParameter, provisioningState, tags).GetAwaiter().GetResult()); }