コード例 #1
0
        public virtual Response <CustomDomainValidateResult> ValidateDomain(CustomDomainValidatePayload validatePayload, CancellationToken cancellationToken = default)
        {
            Argument.AssertNotNull(validatePayload, nameof(validatePayload));

            using var scope = _appPlatformAppResourceAppsClientDiagnostics.CreateScope("AppPlatformAppResource.ValidateDomain");
            scope.Start();
            try
            {
                var response = _appPlatformAppResourceAppsRestClient.ValidateDomain(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, validatePayload, cancellationToken);
                return(response);
            }
            catch (Exception e)
            {
                scope.Failed(e);
                throw;
            }
        }
コード例 #2
0
 /// <summary>
 /// Check the resource name is valid as well as not in use.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the Service resource.
 /// </param>
 /// <param name='appName'>
 /// The name of the App resource.
 /// </param>
 /// <param name='validatePayload'>
 /// Custom domain payload to be validated
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <CustomDomainValidateResult> ValidateDomainAsync(this IAppsOperations operations, string resourceGroupName, string serviceName, string appName, CustomDomainValidatePayload validatePayload, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ValidateDomainWithHttpMessagesAsync(resourceGroupName, serviceName, appName, validatePayload, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
コード例 #3
0
        public virtual async Task <Response <CustomDomainValidateResult> > ValidateDomainAsync(CustomDomainValidatePayload validatePayload, CancellationToken cancellationToken = default)
        {
            Argument.AssertNotNull(validatePayload, nameof(validatePayload));

            using var scope = _gatewayResourceGatewaysClientDiagnostics.CreateScope("GatewayResource.ValidateDomain");
            scope.Start();
            try
            {
                var response = await _gatewayResourceGatewaysRestClient.ValidateDomainAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, validatePayload, cancellationToken).ConfigureAwait(false);

                return(response);
            }
            catch (Exception e)
            {
                scope.Failed(e);
                throw;
            }
        }
コード例 #4
0
 /// <summary>
 /// Check the resource name is valid as well as not in use.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the Service resource.
 /// </param>
 /// <param name='appName'>
 /// The name of the App resource.
 /// </param>
 /// <param name='validatePayload'>
 /// Custom domain payload to be validated
 /// </param>
 public static CustomDomainValidateResult ValidateDomain(this IAppsOperations operations, string resourceGroupName, string serviceName, string appName, CustomDomainValidatePayload validatePayload)
 {
     return(operations.ValidateDomainAsync(resourceGroupName, serviceName, appName, validatePayload).GetAwaiter().GetResult());
 }