/// <summary>
 /// Deletes the specified certificate.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the Batch account.
 /// </param>
 /// <param name='accountName'>
 /// The name of the Batch account.
 /// </param>
 /// <param name='certificateName'>
 /// The identifier for the certificate. This must be made up of algorithm and
 /// thumbprint separated by a dash, and must match the certificate data in the
 /// request. For example SHA1-a3d1c5.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <CertificateDeleteHeaders> BeginDeleteAsync(this ICertificateOperations operations, string resourceGroupName, string accountName, string certificateName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, accountName, certificateName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Headers);
     }
 }
 /// <summary>
 /// Lists all of the certificates in the specified account.
 /// </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 <Certificate> > ListByBatchAccountNextAsync(this ICertificateOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByBatchAccountNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Initializes a new instance of the AutomationManagementClient class.
 /// </summary>
 /// <param name='httpClient'>
 /// The Http client
 /// </param>
 public AutomationManagementClient(HttpClient httpClient)
     : base(httpClient)
 {
     this._activities = new ActivityOperations(this);
     this._agentRegistrationInformation = new AgentRegistrationOperation(this);
     this._automationAccounts           = new AutomationAccountOperations(this);
     this._certificates       = new CertificateOperations(this);
     this._connections        = new ConnectionOperations(this);
     this._connectionTypes    = new ConnectionTypeOperations(this);
     this._psCredentials      = new CredentialOperations(this);
     this._compilationJobs    = new DscCompilationJobOperations(this);
     this._configurations     = new DscConfigurationOperations(this);
     this._nodeConfigurations = new DscNodeConfigurationOperations(this);
     this._nodes       = new DscNodeOperations(this);
     this._nodeReports = new DscNodeReportsOperations(this);
     this._hybridRunbookWorkerGroups = new HybridRunbookWorkerGroupOperations(this);
     this._jobs              = new JobOperations(this);
     this._jobSchedules      = new JobScheduleOperations(this);
     this._jobStreams        = new JobStreamOperations(this);
     this._modules           = new ModuleOperations(this);
     this._runbookDraft      = new RunbookDraftOperations(this);
     this._runbooks          = new RunbookOperations(this);
     this._schedules         = new ScheduleOperations(this);
     this._statistics        = new StatisticsOperations(this);
     this._testJobs          = new TestJobOperations(this);
     this._typeFields        = new TypeFieldOperations(this);
     this._usages            = new UsageOperations(this);
     this._variables         = new VariableOperations(this);
     this._webhooks          = new WebhookOperations(this);
     this._resourceNamespace = "Microsoft.Automation";
     this._apiVersion        = "2014-06-01";
     this._longRunningOperationInitialTimeout = -1;
     this._longRunningOperationRetryTimeout   = -1;
     this.HttpClient.Timeout = TimeSpan.FromSeconds(300);
 }
 /// <summary>
 /// Retrieve a list of certificates.
 /// <see href="http://aka.ms/azureautomationsdk/certificateoperations" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of an Azure Resource group.
 /// </param>
 /// <param name='automationAccountName'>
 /// The name of the automation account.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <Certificate> > ListByAutomationAccountAsync(this ICertificateOperations operations, string resourceGroupName, string automationAccountName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByAutomationAccountWithHttpMessagesAsync(resourceGroupName, automationAccountName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Update a certificate.
 /// <see href="http://aka.ms/azureautomationsdk/certificateoperations" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of an Azure Resource group.
 /// </param>
 /// <param name='automationAccountName'>
 /// The name of the automation account.
 /// </param>
 /// <param name='certificateName'>
 /// The parameters supplied to the update certificate operation.
 /// </param>
 /// <param name='parameters'>
 /// The parameters supplied to the update certificate operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <Certificate> UpdateAsync(this ICertificateOperations operations, string resourceGroupName, string automationAccountName, string certificateName, CertificateUpdateParameters parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, automationAccountName, certificateName, parameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Lists all of the certificates in the specified account.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the Batch account.
 /// </param>
 /// <param name='accountName'>
 /// The name of the Batch account.
 /// </param>
 /// <param name='maxresults'>
 /// The maximum number of items to return in the response.
 /// </param>
 /// <param name='select'>
 /// Comma separated list of properties that should be returned. e.g.
 /// "properties/provisioningState". Only top level properties under properties/
 /// are valid for selection.
 /// </param>
 /// <param name='filter'>
 /// OData filter expression. Valid properties for filtering are
 /// "properties/provisioningState",
 /// "properties/provisioningStateTransitionTime", "name".
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <Certificate> > ListByBatchAccountAsync(this ICertificateOperations operations, string resourceGroupName, string accountName, int?maxresults = default(int?), string select = default(string), string filter = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByBatchAccountWithHttpMessagesAsync(resourceGroupName, accountName, maxresults, select, filter, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Lists all of the Certificates that have been added to the specified
 /// Account.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='certificateListOptions'>
 /// Additional parameters for the operation
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <Certificate> > ListAsync(this ICertificateOperations operations, CertificateListOptions certificateListOptions = default(CertificateListOptions), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListWithHttpMessagesAsync(certificateListOptions, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#8
0
 /// <summary>
 /// Gets information about the specified certificate.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the Batch account.
 /// </param>
 /// <param name='accountName'>
 /// The name of the Batch account.
 /// </param>
 /// <param name='certificateName'>
 /// The identifier for the certificate. This must be made up of algorithm and
 /// thumbprint separated by a dash, and must match the certificate data in the
 /// request. For example SHA1-a3d1c5.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <CertificateInner> GetAsync(this ICertificateOperations operations, string resourceGroupName, string accountName, string certificateName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, accountName, certificateName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#9
0
 /// <summary>
 /// Creates a new certificate inside the specified account.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the Batch account.
 /// </param>
 /// <param name='accountName'>
 /// The name of the Batch account.
 /// </param>
 /// <param name='certificateName'>
 /// The identifier for the certificate. This must be made up of algorithm and
 /// thumbprint separated by a dash, and must match the certificate data in the
 /// request. For example SHA1-a3d1c5.
 /// </param>
 /// <param name='parameters'>
 /// Additional parameters for certificate creation.
 /// </param>
 /// <param name='ifMatch'>
 /// The entity state (ETag) version of the certificate to update. A value of
 /// "*" can be used to apply the operation only if the certificate already
 /// exists. If omitted, this operation will always be applied.
 /// </param>
 /// <param name='ifNoneMatch'>
 /// Set to '*' to allow a new certificate to be created, but to prevent
 /// updating an existing certificate. Other values will be ignored.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <CertificateInner> BeginCreateAsync(this ICertificateOperations operations, string resourceGroupName, string accountName, string certificateName, CertificateCreateOrUpdateParametersInner parameters, string ifMatch = default(string), string ifNoneMatch = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.BeginCreateWithHttpMessagesAsync(resourceGroupName, accountName, certificateName, parameters, ifMatch, ifNoneMatch, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#10
0
 /// <summary>
 /// Initializes a new instance of the AutomationManagementClient class.
 /// </summary>
 /// <param name='httpClient'>
 /// The Http client
 /// </param>
 public AutomationManagementClient(HttpClient httpClient)
     : base(httpClient)
 {
     this._activities         = new ActivityOperations(this);
     this._automationAccounts = new AutomationAccountOperations(this);
     this._certificates       = new CertificateOperations(this);
     this._cloudServices      = new CloudServiceOperations(this);
     this._connections        = new ConnectionOperations(this);
     this._connectionTypes    = new ConnectionTypeOperations(this);
     this._psCredentials      = new CredentialOperations(this);
     this._jobs              = new JobOperations(this);
     this._jobSchedules      = new JobScheduleOperations(this);
     this._jobStreams        = new JobStreamOperations(this);
     this._modules           = new ModuleOperations(this);
     this._runbookDraft      = new RunbookDraftOperations(this);
     this._runbooks          = new RunbookOperations(this);
     this._schedules         = new ScheduleOperations(this);
     this._testJobs          = new TestJobOperations(this);
     this._variables         = new VariableOperations(this);
     this._resourceNamespace = "automation";
     this._apiVersion        = "2013-06-01";
     this._longRunningOperationInitialTimeout = -1;
     this._longRunningOperationRetryTimeout   = -1;
     this.HttpClient.Timeout = TimeSpan.FromSeconds(300);
 }
 /// <summary>
 /// Gets information about the specified Certificate.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='thumbprintAlgorithm'>
 /// The algorithm used to derive the thumbprint parameter. This must be sha1.
 /// </param>
 /// <param name='thumbprint'>
 /// The thumbprint of the Certificate to get.
 /// </param>
 /// <param name='certificateGetOptions'>
 /// Additional parameters for the operation
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <Certificate> GetAsync(this ICertificateOperations operations, string thumbprintAlgorithm, string thumbprint, CertificateGetOptions certificateGetOptions = default(CertificateGetOptions), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(thumbprintAlgorithm, thumbprint, certificateGetOptions, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#12
0
 /// <summary>
 /// Lists a collection of all certificates in the specified service instance.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the API Management service.
 /// </param>
 /// <param name='odataQuery'>
 /// OData parameters to apply to the operation.
 /// </param>
 /// <param name='isKeyVaultRefreshFailed'>
 /// When set to true, the response contains only certificates entities which
 /// failed refresh.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <CertificateContract> > ListByServiceAsync(this ICertificateOperations operations, string resourceGroupName, string serviceName, ODataQuery <CertificateContract> odataQuery = default(ODataQuery <CertificateContract>), bool?isKeyVaultRefreshFailed = default(bool?), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByServiceWithHttpMessagesAsync(resourceGroupName, serviceName, odataQuery, isKeyVaultRefreshFailed, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Adds a Certificate to the specified Account.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='certificate'>
 /// The Certificate to be added.
 /// </param>
 /// <param name='certificateAddOptions'>
 /// Additional parameters for the operation
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <CertificateAddHeaders> AddAsync(this ICertificateOperations operations, CertificateAddParameter certificate, CertificateAddOptions certificateAddOptions = default(CertificateAddOptions), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.AddWithHttpMessagesAsync(certificate, certificateAddOptions, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Headers);
     }
 }
示例#14
0
 /// <summary>
 /// From KeyVault, Refresh the certificate being used for authentication with
 /// the backend.
 /// <see href="https://azure.microsoft.com/en-us/documentation/articles/api-management-howto-mutual-certificates/" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the API Management service.
 /// </param>
 /// <param name='certificateId'>
 /// Identifier of the certificate entity. Must be unique in the current API
 /// Management service instance.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <CertificateContract> RefreshSecretAsync(this ICertificateOperations operations, string resourceGroupName, string serviceName, string certificateId, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.RefreshSecretWithHttpMessagesAsync(resourceGroupName, serviceName, certificateId, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#15
0
 /// <summary>
 /// Creates or updates the certificate being used for authentication with the
 /// backend.
 /// <see href="https://azure.microsoft.com/en-us/documentation/articles/api-management-howto-mutual-certificates/" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the API Management service.
 /// </param>
 /// <param name='certificateId'>
 /// Identifier of the certificate entity. Must be unique in the current API
 /// Management service instance.
 /// </param>
 /// <param name='parameters'>
 /// Create or Update parameters.
 /// </param>
 /// <param name='ifMatch'>
 /// ETag of the Entity. Not required when creating an entity, but required when
 /// updating an entity.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <CertificateContract> CreateOrUpdateAsync(this ICertificateOperations operations, string resourceGroupName, string serviceName, string certificateId, CertificateCreateOrUpdateParameters parameters, string ifMatch = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serviceName, certificateId, parameters, ifMatch, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#16
0
 /// <summary>
 /// Gets the entity state (Etag) version of the certificate specified by its
 /// identifier.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the API Management service.
 /// </param>
 /// <param name='certificateId'>
 /// Identifier of the certificate entity. Must be unique in the current API
 /// Management service instance.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <CertificateGetEntityTagHeaders> GetEntityTagAsync(this ICertificateOperations operations, string resourceGroupName, string serviceName, string certificateId, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetEntityTagWithHttpMessagesAsync(resourceGroupName, serviceName, certificateId, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Headers);
     }
 }
示例#17
0
 /// <summary>
 /// Retrieve next list of certificates.  (see
 /// http://aka.ms/azureautomationsdk/certificateoperations for more
 /// information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Automation.ICertificateOperations.
 /// </param>
 /// <param name='nextLink'>
 /// Required. The link to retrieve next set of items.
 /// </param>
 /// <returns>
 /// The response model for the list certificate operation.
 /// </returns>
 public static CertificateListResponse ListNext(this ICertificateOperations operations, string nextLink)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((ICertificateOperations)s).ListNextAsync(nextLink);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <summary>
 /// Update a certificate.  (see
 /// http://aka.ms/azureautomationsdk/certificateoperations for more
 /// information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Automation.ICertificateOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group
 /// </param>
 /// <param name='automationAccount'>
 /// Required. The automation account name.
 /// </param>
 /// <param name='parameters'>
 /// Required. The parameters supplied to the patch certificate
 /// operation.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static AzureOperationResponse Patch(this ICertificateOperations operations, string resourceGroupName, string automationAccount, CertificatePatchParameters parameters)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((ICertificateOperations)s).PatchAsync(resourceGroupName, automationAccount, parameters);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
示例#19
0
 /// <summary>
 /// Create a certificate.  (see
 /// http://aka.ms/azureautomationsdk/certificateoperations for more
 /// information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Automation.ICertificateOperations.
 /// </param>
 /// <param name='automationAccount'>
 /// Required. The automation account name.
 /// </param>
 /// <param name='parameters'>
 /// Required. The parameters supplied to the create certificate
 /// operation.
 /// </param>
 /// <returns>
 /// The response model for the create certificate operation.
 /// </returns>
 public static CertificateCreateResponse Create(this ICertificateOperations operations, string automationAccount, CertificateCreateParameters parameters)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((ICertificateOperations)s).CreateAsync(automationAccount, parameters);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <summary>
 /// Retrieve the certificate identified by certificate name.  (see
 /// http://aka.ms/azureautomationsdk/certificateoperations for more
 /// information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Automation.ICertificateOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group
 /// </param>
 /// <param name='automationAccount'>
 /// Required. The automation account name.
 /// </param>
 /// <param name='certificateName'>
 /// Required. The name of certificate.
 /// </param>
 /// <returns>
 /// The response model for the get certificate operation.
 /// </returns>
 public static CertificateGetResponse Get(this ICertificateOperations operations, string resourceGroupName, string automationAccount, string certificateName)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((ICertificateOperations)s).GetAsync(resourceGroupName, automationAccount, certificateName);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
示例#21
0
 /// <summary>
 /// Retrieve the certificate identified by certificate name.  (see
 /// http://aka.ms/azureautomationsdk/certificateoperations for more
 /// information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Automation.ICertificateOperations.
 /// </param>
 /// <param name='automationAccount'>
 /// Required. The automation account name.
 /// </param>
 /// <param name='certificateName'>
 /// Required. The name of certificate.
 /// </param>
 /// <returns>
 /// The response model for the get certificate operation.
 /// </returns>
 public static Task <CertificateGetResponse> GetAsync(this ICertificateOperations operations, string automationAccount, string certificateName)
 {
     return(operations.GetAsync(automationAccount, certificateName, CancellationToken.None));
 }
示例#22
0
 /// <summary>
 /// Delete the certificate.  (see
 /// http://aka.ms/azureautomationsdk/certificateoperations for more
 /// information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Automation.ICertificateOperations.
 /// </param>
 /// <param name='automationAccount'>
 /// Required. The automation account name.
 /// </param>
 /// <param name='certificateName'>
 /// Required. The name of certificate.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static Task <AzureOperationResponse> DeleteAsync(this ICertificateOperations operations, string automationAccount, string certificateName)
 {
     return(operations.DeleteAsync(automationAccount, certificateName, CancellationToken.None));
 }
 /// <summary>
 /// Lists all of the Certificates that have been added to the specified
 /// Account.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='certificateListOptions'>
 /// Additional parameters for the operation
 /// </param>
 public static IPage <Certificate> List(this ICertificateOperations operations, CertificateListOptions certificateListOptions = default(CertificateListOptions))
 {
     return(operations.ListAsync(certificateListOptions).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Lists all of the Certificates that have been added to the specified
 /// Account.
 /// </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='certificateListNextOptions'>
 /// Additional parameters for the operation
 /// </param>
 public static IPage <Certificate> ListNext(this ICertificateOperations operations, string nextPageLink, CertificateListNextOptions certificateListNextOptions = default(CertificateListNextOptions))
 {
     return(operations.ListNextAsync(nextPageLink, certificateListNextOptions).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Adds a Certificate to the specified Account.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='certificate'>
 /// The Certificate to be added.
 /// </param>
 /// <param name='certificateAddOptions'>
 /// Additional parameters for the operation
 /// </param>
 public static CertificateAddHeaders Add(this ICertificateOperations operations, CertificateAddParameter certificate, CertificateAddOptions certificateAddOptions = default(CertificateAddOptions))
 {
     return(operations.AddAsync(certificate, certificateAddOptions).GetAwaiter().GetResult());
 }
示例#26
0
 /// <summary>
 /// Retrieve a list of certificates.  (see
 /// http://aka.ms/azureautomationsdk/certificateoperations for more
 /// information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Automation.ICertificateOperations.
 /// </param>
 /// <param name='automationAccount'>
 /// Required. The automation account name.
 /// </param>
 /// <returns>
 /// The response model for the list certificate operation.
 /// </returns>
 public static Task <CertificateListResponse> ListAsync(this ICertificateOperations operations, string automationAccount)
 {
     return(operations.ListAsync(automationAccount, CancellationToken.None));
 }
 /// <summary>
 /// Gets information about the specified Certificate.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='thumbprintAlgorithm'>
 /// The algorithm used to derive the thumbprint parameter. This must be sha1.
 /// </param>
 /// <param name='thumbprint'>
 /// The thumbprint of the Certificate to get.
 /// </param>
 /// <param name='certificateGetOptions'>
 /// Additional parameters for the operation
 /// </param>
 public static Certificate Get(this ICertificateOperations operations, string thumbprintAlgorithm, string thumbprint, CertificateGetOptions certificateGetOptions = default(CertificateGetOptions))
 {
     return(operations.GetAsync(thumbprintAlgorithm, thumbprint, certificateGetOptions).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Cancels a failed deletion of a Certificate from the specified Account.
 /// </summary>
 /// <remarks>
 /// If you try to delete a Certificate that is being used by a Pool or Compute
 /// Node, the status of the Certificate changes to deleteFailed. If you decide
 /// that you want to continue using the Certificate, you can use this operation
 /// to set the status of the Certificate back to active. If you intend to
 /// delete the Certificate, you do not need to run this operation after the
 /// deletion failed. You must make sure that the Certificate is not being used
 /// by any resources, and then you can try again to delete the Certificate.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='thumbprintAlgorithm'>
 /// The algorithm used to derive the thumbprint parameter. This must be sha1.
 /// </param>
 /// <param name='thumbprint'>
 /// The thumbprint of the Certificate being deleted.
 /// </param>
 /// <param name='certificateCancelDeletionOptions'>
 /// Additional parameters for the operation
 /// </param>
 public static CertificateCancelDeletionHeaders CancelDeletion(this ICertificateOperations operations, string thumbprintAlgorithm, string thumbprint, CertificateCancelDeletionOptions certificateCancelDeletionOptions = default(CertificateCancelDeletionOptions))
 {
     return(operations.CancelDeletionAsync(thumbprintAlgorithm, thumbprint, certificateCancelDeletionOptions).GetAwaiter().GetResult());
 }
示例#29
0
 /// <summary>
 /// Retrieve next list of certificates.  (see
 /// http://aka.ms/azureautomationsdk/certificateoperations for more
 /// information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Automation.ICertificateOperations.
 /// </param>
 /// <param name='nextLink'>
 /// Required. The link to retrieve next set of items.
 /// </param>
 /// <returns>
 /// The response model for the list certificate operation.
 /// </returns>
 public static Task <CertificateListResponse> ListNextAsync(this ICertificateOperations operations, string nextLink)
 {
     return(operations.ListNextAsync(nextLink, CancellationToken.None));
 }
示例#30
0
 /// <summary>
 /// Create a certificate.  (see
 /// http://aka.ms/azureautomationsdk/certificateoperations for more
 /// information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Automation.ICertificateOperations.
 /// </param>
 /// <param name='automationAccount'>
 /// Required. The automation account name.
 /// </param>
 /// <param name='parameters'>
 /// Required. The parameters supplied to the create certificate
 /// operation.
 /// </param>
 /// <returns>
 /// The response model for the create certificate operation.
 /// </returns>
 public static Task <CertificateCreateResponse> CreateAsync(this ICertificateOperations operations, string automationAccount, CertificateCreateParameters parameters)
 {
     return(operations.CreateAsync(automationAccount, parameters, CancellationToken.None));
 }