Exemplo n.º 1
0
 /// <summary>
 /// The Create Management Certificate operation adds a certificate to
 /// the list of management certificates. Management certificates,
 /// which are also known as subscription certificates, authenticate
 /// clients attempting to connect to resources associated with your
 /// Azure subscription.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/jj154123.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.IManagementCertificateOperations.
 /// </param>
 /// <param name='parameters'>
 /// Required. Parameters supplied to the Create Management Certificate
 /// operation.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static OperationResponse Create(this IManagementCertificateOperations operations, ManagementCertificateCreateParameters parameters)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IManagementCertificateOperations)s).CreateAsync(parameters);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Exemplo n.º 2
0
 /// <summary>
 /// The Get Management Certificate operation retrieves information
 /// about the management certificate with the specified thumbprint.
 /// Management certificates, which are also known as subscription
 /// certificates, authenticate clients attempting to connect to
 /// resources associated with your Azure subscription.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/jj154131.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.IManagementCertificateOperations.
 /// </param>
 /// <param name='thumbprint'>
 /// Required. The thumbprint value of the certificate to retrieve
 /// information about.
 /// </param>
 /// <returns>
 /// The Get Management Certificate operation response.
 /// </returns>
 public static ManagementCertificateGetResponse Get(this IManagementCertificateOperations operations, string thumbprint)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IManagementCertificateOperations)s).GetAsync(thumbprint);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Exemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the ManagementClient class.
 /// </summary>
 private ManagementClient()
     : base()
 {
     this._affinityGroups         = new AffinityGroupOperations(this);
     this._locations              = new LocationOperations(this);
     this._managementCertificates = new ManagementCertificateOperations(this);
     this._roleSizes              = new RoleSizeOperations(this);
     this._subscriptions          = new SubscriptionOperations(this);
     this.HttpClient.Timeout      = TimeSpan.FromSeconds(300);
 }
Exemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the ManagementClient class.
 /// </summary>
 /// <param name='httpClient'>
 /// The Http client
 /// </param>
 private ManagementClient(HttpClient httpClient)
     : base(httpClient)
 {
     this._affinityGroups                     = new AffinityGroupOperations(this);
     this._locations                          = new LocationOperations(this);
     this._managementCertificates             = new ManagementCertificateOperations(this);
     this._roleSizes                          = new RoleSizeOperations(this);
     this._subscriptions                      = new SubscriptionOperations(this);
     this._apiVersion                         = "2014-05-01";
     this._longRunningOperationInitialTimeout = -1;
     this._longRunningOperationRetryTimeout   = -1;
     this.HttpClient.Timeout                  = TimeSpan.FromSeconds(300);
 }
Exemplo n.º 5
0
 /// <summary>
 /// Initializes a new instance of the ManagementClient class.
 /// </summary>
 public ManagementClient()
     : base()
 {
     this._affinityGroups                     = new AffinityGroupOperations(this);
     this._locations                          = new LocationOperations(this);
     this._managementCertificates             = new ManagementCertificateOperations(this);
     this._roleSizes                          = new RoleSizeOperations(this);
     this._subscriptions                      = new SubscriptionOperations(this);
     this._subscriptionServicePrincipals      = new SubscriptionServicePrincipalOperations(this);
     this._apiVersion                         = "2018-06-01";
     this._longRunningOperationInitialTimeout = -1;
     this._longRunningOperationRetryTimeout   = -1;
     this.HttpClient.Timeout                  = TimeSpan.FromSeconds(300);
 }
Exemplo n.º 6
0
 /// <summary>
 /// The Add Management Certificate operation adds a certificate to the
 /// list of management certificates. Management certificates, which
 /// are also known as subscription certificates, authenticate clients
 /// attempting to connect to resources associated with your Windows
 /// Azure subscription.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/jj154123.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.IManagementCertificateOperations.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the Create Management Certificate operation.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static OperationResponse Create(this IManagementCertificateOperations operations, ManagementCertificateCreateParameters parameters)
 {
     try
     {
         return(operations.CreateAsync(parameters).Result);
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
Exemplo n.º 7
0
 /// <summary>
 /// The List Management Certificates operation lists and returns basic
 /// information about all of the management certificates associated
 /// with the specified subscription. Management certificates, which
 /// are also known as subscription certificates, authenticate clients
 /// attempting to connect to resources associated with your Windows
 /// Azure subscription.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/jj154105.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.IManagementCertificateOperations.
 /// </param>
 /// <returns>
 /// The List Management Certificates operation response.
 /// </returns>
 public static ManagementCertificateListResponse List(this IManagementCertificateOperations operations)
 {
     try
     {
         return(operations.ListAsync().Result);
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
Exemplo n.º 8
0
 /// <summary>
 /// The Get Management Certificate operation retrieves information
 /// about the management certificate with the specified thumbprint.
 /// Management certificates, which are also known as subscription
 /// certificates, authenticate clients attempting to connect to
 /// resources associated with your Windows Azure subscription.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/jj154131.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.IManagementCertificateOperations.
 /// </param>
 /// <param name='thumbprint'>
 /// The thumbprint value of the certificate to retrieve information
 /// about.
 /// </param>
 /// <returns>
 /// The Get Management Certificate operation response.
 /// </returns>
 public static ManagementCertificateGetResponse Get(this IManagementCertificateOperations operations, string thumbprint)
 {
     try
     {
         return(operations.GetAsync(thumbprint).Result);
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
Exemplo n.º 9
0
 /// <summary>
 /// The List Management Certificates operation lists and returns basic
 /// information about all of the management certificates associated
 /// with the specified subscription. Management certificates, which
 /// are also known as subscription certificates, authenticate clients
 /// attempting to connect to resources associated with your Windows
 /// Azure subscription.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/jj154105.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.IManagementCertificateOperations.
 /// </param>
 /// <returns>
 /// The List Management Certificates operation response.
 /// </returns>
 public static Task <ManagementCertificateListResponse> ListAsync(this IManagementCertificateOperations operations)
 {
     return(operations.ListAsync(CancellationToken.None));
 }
Exemplo n.º 10
0
 /// <summary>
 /// The Get Management Certificate operation retrieves information
 /// about the management certificate with the specified thumbprint.
 /// Management certificates, which are also known as subscription
 /// certificates, authenticate clients attempting to connect to
 /// resources associated with your Windows Azure subscription.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/jj154131.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.IManagementCertificateOperations.
 /// </param>
 /// <param name='thumbprint'>
 /// The thumbprint value of the certificate to retrieve information
 /// about.
 /// </param>
 /// <returns>
 /// The Get Management Certificate operation response.
 /// </returns>
 public static Task <ManagementCertificateGetResponse> GetAsync(this IManagementCertificateOperations operations, string thumbprint)
 {
     return(operations.GetAsync(thumbprint, CancellationToken.None));
 }
Exemplo n.º 11
0
 /// <summary>
 /// The Add Management Certificate operation adds a certificate to the
 /// list of management certificates. Management certificates, which
 /// are also known as subscription certificates, authenticate clients
 /// attempting to connect to resources associated with your Windows
 /// Azure subscription.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/jj154123.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.IManagementCertificateOperations.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the Create Management Certificate operation.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static Task <OperationResponse> CreateAsync(this IManagementCertificateOperations operations, ManagementCertificateCreateParameters parameters)
 {
     return(operations.CreateAsync(parameters, CancellationToken.None));
 }
Exemplo n.º 12
0
 /// <summary>
 /// The Delete Management Certificate operation deletes a certificate
 /// from the list of management certificates. Management certificates,
 /// which are also known as subscription certificates, authenticate
 /// clients attempting to connect to resources associated with your
 /// Azure subscription.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/jj154127.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.IManagementCertificateOperations.
 /// </param>
 /// <param name='thumbprint'>
 /// Required. The thumbprint value of the certificate to delete.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static Task <AzureOperationResponse> DeleteAsync(this IManagementCertificateOperations operations, string thumbprint)
 {
     return(operations.DeleteAsync(thumbprint, CancellationToken.None));
 }