Class: Azure::ARM::Web::CertificateOrders

Inherits:
Object
  • Object
show all
Includes:
Models, MsRestAzure
Defined in:
lib/azure_mgmt_web/certificate_orders.rb

Overview

Use these APIs to manage Azure Websites resources through the Azure Resource Manager. All task operations conform to the HTTP/1.1 protocol specification and each operation returns an x-ms-request-id header that can be used to obtain information about the request. You must make sure that requests made to these resources are secure. For more information, see <a href=“msdn.microsoft.com/en-us/library/azure/dn790557.aspx”>Authenticating Azure Resource Manager requests.</a>

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ CertificateOrders

Creates and initializes a new instance of the CertificateOrders class.

Parameters:

  • client

    service class for accessing basic functionality.



25
26
27
# File 'lib/azure_mgmt_web/certificate_orders.rb', line 25

def initialize(client)
  @client = client
end

Instance Attribute Details

#clientObject (readonly)

Returns reference to the WebSiteManagementClient.

Returns:

  • reference to the WebSiteManagementClient



30
31
32
# File 'lib/azure_mgmt_web/certificate_orders.rb', line 30

def client
  @client
end

Instance Method Details

#create_or_update_certificate(resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers = nil) ⇒ CertificateOrderCertificate

Associates a Key Vault secret to a certificate store that will be used for storing the certificate once it’s ready

csm Id will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Azure resource group name

  • certificate_order_name (String)

    Certificate name

  • name (String)

    Certificate name

  • key_vault_certificate (CertificateOrderCertificate)

    Key Vault secret

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:



144
145
146
147
# File 'lib/azure_mgmt_web/certificate_orders.rb', line 144

def create_or_update_certificate(resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers = nil)
  response = create_or_update_certificate_async(resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers).value!
  response.body unless response.nil?
end

#create_or_update_certificate_async(resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers = nil) ⇒ Concurrent::Promise

Associates a Key Vault secret to a certificate store that will be used for storing the certificate once it’s ready

csm Id to the HTTP request.

Parameters:

  • resource_group_name (String)

    Azure resource group name

  • certificate_order_name (String)

    Certificate name

  • name (String)

    Certificate name

  • key_vault_certificate (CertificateOrderCertificate)

    Key Vault secret

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
# File 'lib/azure_mgmt_web/certificate_orders.rb', line 181

def create_or_update_certificate_async(resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'certificate_order_name is nil' if certificate_order_name.nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'key_vault_certificate is nil' if key_vault_certificate.nil?
  key_vault_certificate.validate unless key_vault_certificate.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?

  # Serialize Request
  request_headers['Content-Type'] = 'application/json; charset=utf-8'
  unless key_vault_certificate.nil?
    key_vault_certificate = CertificateOrderCertificate.serialize_object(key_vault_certificate)
  end
  request_content = key_vault_certificate != nil ? JSON.generate(key_vault_certificate, quirks_mode: true) : nil
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'
  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'certificateOrderName' => certificate_order_name,'name' => name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      body: request_content,
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

  request = MsRest::HttpOperationRequest.new(request_url, path_template, :put, options)
  promise = request.run_promise do |req|
    @client.credentials.sign_request(req) unless @client.credentials.nil?
  end

  promise = promise.then do |http_response|
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
    end

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        unless parsed_response.nil?
          parsed_response = CertificateOrderCertificate.deserialize_object(parsed_response)
        end
        result.body = parsed_response
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#create_or_update_certificate_order(resource_group_name, name, certificate_distinguished_name, custom_headers = nil) ⇒ CertificateOrder

Create or update a certificate purchase order

to be used for purchasing certificate will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Azure resource group name

  • name (String)

    Certificate name

  • certificate_distinguished_name (CertificateOrder)

    Distinguished name

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:



556
557
558
559
# File 'lib/azure_mgmt_web/certificate_orders.rb', line 556

def create_or_update_certificate_order(resource_group_name, name, certificate_distinguished_name, custom_headers = nil)
  response = create_or_update_certificate_order_async(resource_group_name, name, certificate_distinguished_name, custom_headers).value!
  response.body unless response.nil?
end

#create_or_update_certificate_order_async(resource_group_name, name, certificate_distinguished_name, custom_headers = nil) ⇒ Concurrent::Promise

Create or update a certificate purchase order

to be used for purchasing certificate to the HTTP request.

Parameters:

  • resource_group_name (String)

    Azure resource group name

  • name (String)

    Certificate name

  • certificate_distinguished_name (CertificateOrder)

    Distinguished name

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
# File 'lib/azure_mgmt_web/certificate_orders.rb', line 589

def create_or_update_certificate_order_async(resource_group_name, name, certificate_distinguished_name, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'certificate_distinguished_name is nil' if certificate_distinguished_name.nil?
  certificate_distinguished_name.validate unless certificate_distinguished_name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?

  # Serialize Request
  request_headers['Content-Type'] = 'application/json; charset=utf-8'
  unless certificate_distinguished_name.nil?
    certificate_distinguished_name = CertificateOrder.serialize_object(certificate_distinguished_name)
  end
  request_content = certificate_distinguished_name != nil ? JSON.generate(certificate_distinguished_name, quirks_mode: true) : nil
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}'
  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      body: request_content,
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

  request = MsRest::HttpOperationRequest.new(request_url, path_template, :put, options)
  promise = request.run_promise do |req|
    @client.credentials.sign_request(req) unless @client.credentials.nil?
  end

  promise = promise.then do |http_response|
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
    end

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        unless parsed_response.nil?
          parsed_response = CertificateOrder.deserialize_object(parsed_response)
        end
        result.body = parsed_response
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#create_or_update_certificate_order_with_http_info(resource_group_name, name, certificate_distinguished_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Create or update a certificate purchase order

to be used for purchasing certificate will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Azure resource group name

  • name (String)

    Certificate name

  • certificate_distinguished_name (CertificateOrder)

    Distinguished name

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



573
574
575
# File 'lib/azure_mgmt_web/certificate_orders.rb', line 573

def create_or_update_certificate_order_with_http_info(resource_group_name, name, certificate_distinguished_name, custom_headers = nil)
  create_or_update_certificate_order_async(resource_group_name, name, certificate_distinguished_name, custom_headers).value!
end

#create_or_update_certificate_with_http_info(resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Associates a Key Vault secret to a certificate store that will be used for storing the certificate once it’s ready

csm Id will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Azure resource group name

  • certificate_order_name (String)

    Certificate name

  • name (String)

    Certificate name

  • key_vault_certificate (CertificateOrderCertificate)

    Key Vault secret

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



163
164
165
# File 'lib/azure_mgmt_web/certificate_orders.rb', line 163

def create_or_update_certificate_with_http_info(resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers = nil)
  create_or_update_certificate_async(resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers).value!
end

#delete_certificate(resource_group_name, certificate_order_name, name, custom_headers = nil) ⇒ Object

Deletes the certificate associated with the certificate order

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Azure resource group name

  • certificate_order_name (String)

    Certificate name

  • name (String)

    Certificate name

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Object)

    operation results.



258
259
260
261
# File 'lib/azure_mgmt_web/certificate_orders.rb', line 258

def delete_certificate(resource_group_name, certificate_order_name, name, custom_headers = nil)
  response = delete_certificate_async(resource_group_name, certificate_order_name, name, custom_headers).value!
  response.body unless response.nil?
end

#delete_certificate_async(resource_group_name, certificate_order_name, name, custom_headers = nil) ⇒ Concurrent::Promise

Deletes the certificate associated with the certificate order

to the HTTP request.

Parameters:

  • resource_group_name (String)

    Azure resource group name

  • certificate_order_name (String)

    Certificate name

  • name (String)

    Certificate name

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
# File 'lib/azure_mgmt_web/certificate_orders.rb', line 289

def delete_certificate_async(resource_group_name, certificate_order_name, name, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'certificate_order_name is nil' if certificate_order_name.nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'
  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'certificateOrderName' => certificate_order_name,'name' => name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

  request = MsRest::HttpOperationRequest.new(request_url, path_template, :delete, options)
  promise = request.run_promise do |req|
    @client.credentials.sign_request(req) unless @client.credentials.nil?
  end

  promise = promise.then do |http_response|
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
    end

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?

    result
  end

  promise.execute
end

#delete_certificate_order(resource_group_name, name, custom_headers = nil) ⇒ Object

Delete an existing certificate order

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Azure resource group name

  • name (String)

    Certificate name

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Object)

    operation results.



664
665
666
667
# File 'lib/azure_mgmt_web/certificate_orders.rb', line 664

def delete_certificate_order(resource_group_name, name, custom_headers = nil)
  response = delete_certificate_order_async(resource_group_name, name, custom_headers).value!
  response.body unless response.nil?
end

#delete_certificate_order_async(resource_group_name, name, custom_headers = nil) ⇒ Concurrent::Promise

Delete an existing certificate order

to the HTTP request.

Parameters:

  • resource_group_name (String)

    Azure resource group name

  • name (String)

    Certificate name

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
# File 'lib/azure_mgmt_web/certificate_orders.rb', line 693

def delete_certificate_order_async(resource_group_name, name, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}'
  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

  request = MsRest::HttpOperationRequest.new(request_url, path_template, :delete, options)
  promise = request.run_promise do |req|
    @client.credentials.sign_request(req) unless @client.credentials.nil?
  end

  promise = promise.then do |http_response|
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
    end

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?

    result
  end

  promise.execute
end

#delete_certificate_order_with_http_info(resource_group_name, name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Delete an existing certificate order

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Azure resource group name

  • name (String)

    Certificate name

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



679
680
681
# File 'lib/azure_mgmt_web/certificate_orders.rb', line 679

def delete_certificate_order_with_http_info(resource_group_name, name, custom_headers = nil)
  delete_certificate_order_async(resource_group_name, name, custom_headers).value!
end

#delete_certificate_with_http_info(resource_group_name, certificate_order_name, name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Deletes the certificate associated with the certificate order

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Azure resource group name

  • certificate_order_name (String)

    Certificate name

  • name (String)

    Certificate name

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



274
275
276
# File 'lib/azure_mgmt_web/certificate_orders.rb', line 274

def delete_certificate_with_http_info(resource_group_name, certificate_order_name, name, custom_headers = nil)
  delete_certificate_async(resource_group_name, certificate_order_name, name, custom_headers).value!
end

#get_certificate(resource_group_name, certificate_order_name, name, custom_headers = nil) ⇒ CertificateOrderCertificate

Get certificate associated with the certificate order

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Azure resource group name

  • certificate_order_name (String)

    Certificate name

  • name (String)

    Certificate name

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:



43
44
45
46
# File 'lib/azure_mgmt_web/certificate_orders.rb', line 43

def get_certificate(resource_group_name, certificate_order_name, name, custom_headers = nil)
  response = get_certificate_async(resource_group_name, certificate_order_name, name, custom_headers).value!
  response.body unless response.nil?
end

#get_certificate_async(resource_group_name, certificate_order_name, name, custom_headers = nil) ⇒ Concurrent::Promise

Get certificate associated with the certificate order

to the HTTP request.

Parameters:

  • resource_group_name (String)

    Azure resource group name

  • certificate_order_name (String)

    Certificate name

  • name (String)

    Certificate name

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# File 'lib/azure_mgmt_web/certificate_orders.rb', line 74

def get_certificate_async(resource_group_name, certificate_order_name, name, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'certificate_order_name is nil' if certificate_order_name.nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'
  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'certificateOrderName' => certificate_order_name,'name' => name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

  request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
  promise = request.run_promise do |req|
    @client.credentials.sign_request(req) unless @client.credentials.nil?
  end

  promise = promise.then do |http_response|
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
    end

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        unless parsed_response.nil?
          parsed_response = CertificateOrderCertificate.deserialize_object(parsed_response)
        end
        result.body = parsed_response
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#get_certificate_order(resource_group_name, name, custom_headers = nil) ⇒ CertificateOrder

Get a certificate order

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Azure resource group name

  • name (String)

    Certificate name

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:



460
461
462
463
# File 'lib/azure_mgmt_web/certificate_orders.rb', line 460

def get_certificate_order(resource_group_name, name, custom_headers = nil)
  response = get_certificate_order_async(resource_group_name, name, custom_headers).value!
  response.body unless response.nil?
end

#get_certificate_order_async(resource_group_name, name, custom_headers = nil) ⇒ Concurrent::Promise

Get a certificate order

to the HTTP request.

Parameters:

  • resource_group_name (String)

    Azure resource group name

  • name (String)

    Certificate name

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
# File 'lib/azure_mgmt_web/certificate_orders.rb', line 489

def get_certificate_order_async(resource_group_name, name, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}'
  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

  request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
  promise = request.run_promise do |req|
    @client.credentials.sign_request(req) unless @client.credentials.nil?
  end

  promise = promise.then do |http_response|
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
    end

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        unless parsed_response.nil?
          parsed_response = CertificateOrder.deserialize_object(parsed_response)
        end
        result.body = parsed_response
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#get_certificate_order_with_http_info(resource_group_name, name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Get a certificate order

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Azure resource group name

  • name (String)

    Certificate name

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



475
476
477
# File 'lib/azure_mgmt_web/certificate_orders.rb', line 475

def get_certificate_order_with_http_info(resource_group_name, name, custom_headers = nil)
  get_certificate_order_async(resource_group_name, name, custom_headers).value!
end

#get_certificate_orders(resource_group_name, custom_headers = nil) ⇒ CertificateOrderCollection

Get certificate orders in a resource group

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Azure resource group name

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:



855
856
857
858
# File 'lib/azure_mgmt_web/certificate_orders.rb', line 855

def get_certificate_orders(resource_group_name, custom_headers = nil)
  response = get_certificate_orders_async(resource_group_name, custom_headers).value!
  response.body unless response.nil?
end

#get_certificate_orders_async(resource_group_name, custom_headers = nil) ⇒ Concurrent::Promise

Get certificate orders in a resource group

to the HTTP request.

Parameters:

  • resource_group_name (String)

    Azure resource group name

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
# File 'lib/azure_mgmt_web/certificate_orders.rb', line 882

def get_certificate_orders_async(resource_group_name, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders'
  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

  request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
  promise = request.run_promise do |req|
    @client.credentials.sign_request(req) unless @client.credentials.nil?
  end

  promise = promise.then do |http_response|
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
    end

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        unless parsed_response.nil?
          parsed_response = CertificateOrderCollection.deserialize_object(parsed_response)
        end
        result.body = parsed_response
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#get_certificate_orders_with_http_info(resource_group_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Get certificate orders in a resource group

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Azure resource group name

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



869
870
871
# File 'lib/azure_mgmt_web/certificate_orders.rb', line 869

def get_certificate_orders_with_http_info(resource_group_name, custom_headers = nil)
  get_certificate_orders_async(resource_group_name, custom_headers).value!
end

#get_certificate_with_http_info(resource_group_name, certificate_order_name, name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Get certificate associated with the certificate order

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Azure resource group name

  • certificate_order_name (String)

    Certificate name

  • name (String)

    Certificate name

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



59
60
61
# File 'lib/azure_mgmt_web/certificate_orders.rb', line 59

def get_certificate_with_http_info(resource_group_name, certificate_order_name, name, custom_headers = nil)
  get_certificate_async(resource_group_name, certificate_order_name, name, custom_headers).value!
end

#get_certificates(resource_group_name, certificate_order_name, custom_headers = nil) ⇒ CertificateOrderCertificateCollection

List all certificates associated with a certificate order (only one certificate can be associated with an order at a time)

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Azure resource group name

  • certificate_order_name (String)

    Certificate name

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:



947
948
949
950
# File 'lib/azure_mgmt_web/certificate_orders.rb', line 947

def get_certificates(resource_group_name, certificate_order_name, custom_headers = nil)
  response = get_certificates_async(resource_group_name, certificate_order_name, custom_headers).value!
  response.body unless response.nil?
end

#get_certificates_async(resource_group_name, certificate_order_name, custom_headers = nil) ⇒ Concurrent::Promise

List all certificates associated with a certificate order (only one certificate can be associated with an order at a time)

to the HTTP request.

Parameters:

  • resource_group_name (String)

    Azure resource group name

  • certificate_order_name (String)

    Certificate name

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
# File 'lib/azure_mgmt_web/certificate_orders.rb', line 978

def get_certificates_async(resource_group_name, certificate_order_name, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'certificate_order_name is nil' if certificate_order_name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates'
  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'certificateOrderName' => certificate_order_name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

  request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
  promise = request.run_promise do |req|
    @client.credentials.sign_request(req) unless @client.credentials.nil?
  end

  promise = promise.then do |http_response|
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
    end

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        unless parsed_response.nil?
          parsed_response = CertificateOrderCertificateCollection.deserialize_object(parsed_response)
        end
        result.body = parsed_response
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#get_certificates_with_http_info(resource_group_name, certificate_order_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

List all certificates associated with a certificate order (only one certificate can be associated with an order at a time)

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Azure resource group name

  • certificate_order_name (String)

    Certificate name

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



963
964
965
# File 'lib/azure_mgmt_web/certificate_orders.rb', line 963

def get_certificates_with_http_info(resource_group_name, certificate_order_name, custom_headers = nil)
  get_certificates_async(resource_group_name, certificate_order_name, custom_headers).value!
end

#reissue_certificate_order(resource_group_name, name, reissue_certificate_order_request, custom_headers = nil) ⇒ Object

Reissue an existing certificate order

Reissue parameters will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Azure resource group name

  • name (String)

    Certificate name

  • reissue_certificate_order_request (ReissueCertificateOrderRequest)
  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Object)

    operation results.



1045
1046
1047
1048
# File 'lib/azure_mgmt_web/certificate_orders.rb', line 1045

def reissue_certificate_order(resource_group_name, name, reissue_certificate_order_request, custom_headers = nil)
  response = reissue_certificate_order_async(resource_group_name, name, reissue_certificate_order_request, custom_headers).value!
  response.body unless response.nil?
end

#reissue_certificate_order_async(resource_group_name, name, reissue_certificate_order_request, custom_headers = nil) ⇒ Concurrent::Promise

Reissue an existing certificate order

Reissue parameters to the HTTP request.

Parameters:

  • resource_group_name (String)

    Azure resource group name

  • name (String)

    Certificate name

  • reissue_certificate_order_request (ReissueCertificateOrderRequest)
  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
# File 'lib/azure_mgmt_web/certificate_orders.rb', line 1078

def reissue_certificate_order_async(resource_group_name, name, reissue_certificate_order_request, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'reissue_certificate_order_request is nil' if reissue_certificate_order_request.nil?
  reissue_certificate_order_request.validate unless reissue_certificate_order_request.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?

  # Serialize Request
  request_headers['Content-Type'] = 'application/json; charset=utf-8'
  unless reissue_certificate_order_request.nil?
    reissue_certificate_order_request = ReissueCertificateOrderRequest.serialize_object(reissue_certificate_order_request)
  end
  request_content = reissue_certificate_order_request != nil ? JSON.generate(reissue_certificate_order_request, quirks_mode: true) : nil
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/reissue'
  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      body: request_content,
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

  request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
  promise = request.run_promise do |req|
    @client.credentials.sign_request(req) unless @client.credentials.nil?
  end

  promise = promise.then do |http_response|
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
    end

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?

    result
  end

  promise.execute
end

#reissue_certificate_order_with_http_info(resource_group_name, name, reissue_certificate_order_request, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Reissue an existing certificate order

Reissue parameters will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Azure resource group name

  • name (String)

    Certificate name

  • reissue_certificate_order_request (ReissueCertificateOrderRequest)
  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1062
1063
1064
# File 'lib/azure_mgmt_web/certificate_orders.rb', line 1062

def reissue_certificate_order_with_http_info(resource_group_name, name, reissue_certificate_order_request, custom_headers = nil)
  reissue_certificate_order_async(resource_group_name, name, reissue_certificate_order_request, custom_headers).value!
end

#renew_certificate_order(resource_group_name, name, renew_certificate_order_request, custom_headers = nil) ⇒ Object

Renew an existing certificate order

parameters will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Azure resource group name

  • name (String)

    Certificate name

  • renew_certificate_order_request (RenewCertificateOrderRequest)

    Renew

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Object)

    operation results.



1143
1144
1145
1146
# File 'lib/azure_mgmt_web/certificate_orders.rb', line 1143

def renew_certificate_order(resource_group_name, name, renew_certificate_order_request, custom_headers = nil)
  response = renew_certificate_order_async(resource_group_name, name, renew_certificate_order_request, custom_headers).value!
  response.body unless response.nil?
end

#renew_certificate_order_async(resource_group_name, name, renew_certificate_order_request, custom_headers = nil) ⇒ Concurrent::Promise

Renew an existing certificate order

parameters to the HTTP request.

Parameters:

  • resource_group_name (String)

    Azure resource group name

  • name (String)

    Certificate name

  • renew_certificate_order_request (RenewCertificateOrderRequest)

    Renew

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
# File 'lib/azure_mgmt_web/certificate_orders.rb', line 1176

def renew_certificate_order_async(resource_group_name, name, renew_certificate_order_request, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'renew_certificate_order_request is nil' if renew_certificate_order_request.nil?
  renew_certificate_order_request.validate unless renew_certificate_order_request.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?

  # Serialize Request
  request_headers['Content-Type'] = 'application/json; charset=utf-8'
  unless renew_certificate_order_request.nil?
    renew_certificate_order_request = RenewCertificateOrderRequest.serialize_object(renew_certificate_order_request)
  end
  request_content = renew_certificate_order_request != nil ? JSON.generate(renew_certificate_order_request, quirks_mode: true) : nil
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/renew'
  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      body: request_content,
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

  request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
  promise = request.run_promise do |req|
    @client.credentials.sign_request(req) unless @client.credentials.nil?
  end

  promise = promise.then do |http_response|
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
    end

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?

    result
  end

  promise.execute
end

#renew_certificate_order_with_http_info(resource_group_name, name, renew_certificate_order_request, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Renew an existing certificate order

parameters will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Azure resource group name

  • name (String)

    Certificate name

  • renew_certificate_order_request (RenewCertificateOrderRequest)

    Renew

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1160
1161
1162
# File 'lib/azure_mgmt_web/certificate_orders.rb', line 1160

def renew_certificate_order_with_http_info(resource_group_name, name, renew_certificate_order_request, custom_headers = nil)
  renew_certificate_order_async(resource_group_name, name, renew_certificate_order_request, custom_headers).value!
end

#resend_certificate_email(resource_group_name, name, custom_headers = nil) ⇒ Object

Resend certificate email

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Azure resource group name

  • name (String)

    Certificate order name

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Object)

    operation results.



1441
1442
1443
1444
# File 'lib/azure_mgmt_web/certificate_orders.rb', line 1441

def resend_certificate_email(resource_group_name, name, custom_headers = nil)
  response = resend_certificate_email_async(resource_group_name, name, custom_headers).value!
  response.body unless response.nil?
end

#resend_certificate_email_async(resource_group_name, name, custom_headers = nil) ⇒ Concurrent::Promise

Resend certificate email

to the HTTP request.

Parameters:

  • resource_group_name (String)

    Azure resource group name

  • name (String)

    Certificate order name

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
# File 'lib/azure_mgmt_web/certificate_orders.rb', line 1470

def resend_certificate_email_async(resource_group_name, name, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/resendEmail'
  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

  request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
  promise = request.run_promise do |req|
    @client.credentials.sign_request(req) unless @client.credentials.nil?
  end

  promise = promise.then do |http_response|
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
    end

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?

    result
  end

  promise.execute
end

#resend_certificate_email_with_http_info(resource_group_name, name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Resend certificate email

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Azure resource group name

  • name (String)

    Certificate order name

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1456
1457
1458
# File 'lib/azure_mgmt_web/certificate_orders.rb', line 1456

def resend_certificate_email_with_http_info(resource_group_name, name, custom_headers = nil)
  resend_certificate_email_async(resource_group_name, name, custom_headers).value!
end

#retrieve_certificate_actions(resource_group_name, name, custom_headers = nil) ⇒ Array

Retrieve the list of certificate actions

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Azure resource group name

  • name (String)

    Certificate order name

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array)

    operation results.



1239
1240
1241
1242
# File 'lib/azure_mgmt_web/certificate_orders.rb', line 1239

def retrieve_certificate_actions(resource_group_name, name, custom_headers = nil)
  response = retrieve_certificate_actions_async(resource_group_name, name, custom_headers).value!
  response.body unless response.nil?
end

#retrieve_certificate_actions_async(resource_group_name, name, custom_headers = nil) ⇒ Concurrent::Promise

Retrieve the list of certificate actions

to the HTTP request.

Parameters:

  • resource_group_name (String)

    Azure resource group name

  • name (String)

    Certificate order name

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
# File 'lib/azure_mgmt_web/certificate_orders.rb', line 1268

def retrieve_certificate_actions_async(resource_group_name, name, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions'
  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

  request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
  promise = request.run_promise do |req|
    @client.credentials.sign_request(req) unless @client.credentials.nil?
  end

  promise = promise.then do |http_response|
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
    end

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        unless parsed_response.nil?
          deserialized_array = []
          parsed_response.each do |element|
            unless element.nil?
              element = CertificateOrderAction.deserialize_object(element)
            end
            deserialized_array.push(element)
          end
          parsed_response = deserialized_array
        end
        result.body = parsed_response
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#retrieve_certificate_actions_with_http_info(resource_group_name, name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Retrieve the list of certificate actions

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Azure resource group name

  • name (String)

    Certificate order name

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1254
1255
1256
# File 'lib/azure_mgmt_web/certificate_orders.rb', line 1254

def retrieve_certificate_actions_with_http_info(resource_group_name, name, custom_headers = nil)
  retrieve_certificate_actions_async(resource_group_name, name, custom_headers).value!
end

#retrieve_certificate_email_history(resource_group_name, name, custom_headers = nil) ⇒ Array

Retrive email history

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Azure resource group name

  • name (String)

    Certificate order name

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Array)

    operation results.



1340
1341
1342
1343
# File 'lib/azure_mgmt_web/certificate_orders.rb', line 1340

def retrieve_certificate_email_history(resource_group_name, name, custom_headers = nil)
  response = retrieve_certificate_email_history_async(resource_group_name, name, custom_headers).value!
  response.body unless response.nil?
end

#retrieve_certificate_email_history_async(resource_group_name, name, custom_headers = nil) ⇒ Concurrent::Promise

Retrive email history

to the HTTP request.

Parameters:

  • resource_group_name (String)

    Azure resource group name

  • name (String)

    Certificate order name

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
# File 'lib/azure_mgmt_web/certificate_orders.rb', line 1369

def retrieve_certificate_email_history_async(resource_group_name, name, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory'
  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

  request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
  promise = request.run_promise do |req|
    @client.credentials.sign_request(req) unless @client.credentials.nil?
  end

  promise = promise.then do |http_response|
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
    end

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        unless parsed_response.nil?
          deserialized_array = []
          parsed_response.each do |element|
            unless element.nil?
              element = CertificateEmail.deserialize_object(element)
            end
            deserialized_array.push(element)
          end
          parsed_response = deserialized_array
        end
        result.body = parsed_response
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#retrieve_certificate_email_history_with_http_info(resource_group_name, name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Retrive email history

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Azure resource group name

  • name (String)

    Certificate order name

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1355
1356
1357
# File 'lib/azure_mgmt_web/certificate_orders.rb', line 1355

def retrieve_certificate_email_history_with_http_info(resource_group_name, name, custom_headers = nil)
  retrieve_certificate_email_history_async(resource_group_name, name, custom_headers).value!
end

#update_certificate(resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers = nil) ⇒ CertificateOrderCertificate

Associates a Key Vault secret to a certificate store that will be used for storing the certificate once it’s ready

csm Id will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Azure resource group name

  • certificate_order_name (String)

    Certificate name

  • name (String)

    Certificate name

  • key_vault_certificate (CertificateOrderCertificate)

    Key Vault secret

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:



347
348
349
350
# File 'lib/azure_mgmt_web/certificate_orders.rb', line 347

def update_certificate(resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers = nil)
  response = update_certificate_async(resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers).value!
  response.body unless response.nil?
end

#update_certificate_async(resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers = nil) ⇒ Concurrent::Promise

Associates a Key Vault secret to a certificate store that will be used for storing the certificate once it’s ready

csm Id to the HTTP request.

Parameters:

  • resource_group_name (String)

    Azure resource group name

  • certificate_order_name (String)

    Certificate name

  • name (String)

    Certificate name

  • key_vault_certificate (CertificateOrderCertificate)

    Key Vault secret

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
# File 'lib/azure_mgmt_web/certificate_orders.rb', line 384

def update_certificate_async(resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'certificate_order_name is nil' if certificate_order_name.nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'key_vault_certificate is nil' if key_vault_certificate.nil?
  key_vault_certificate.validate unless key_vault_certificate.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?

  # Serialize Request
  request_headers['Content-Type'] = 'application/json; charset=utf-8'
  unless key_vault_certificate.nil?
    key_vault_certificate = CertificateOrderCertificate.serialize_object(key_vault_certificate)
  end
  request_content = key_vault_certificate != nil ? JSON.generate(key_vault_certificate, quirks_mode: true) : nil
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'
  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'certificateOrderName' => certificate_order_name,'name' => name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      body: request_content,
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

  request = MsRest::HttpOperationRequest.new(request_url, path_template, :patch, options)
  promise = request.run_promise do |req|
    @client.credentials.sign_request(req) unless @client.credentials.nil?
  end

  promise = promise.then do |http_response|
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
    end

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        unless parsed_response.nil?
          parsed_response = CertificateOrderCertificate.deserialize_object(parsed_response)
        end
        result.body = parsed_response
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#update_certificate_order(resource_group_name, name, certificate_distinguished_name, custom_headers = nil) ⇒ CertificateOrder

Create or update a certificate purchase order

to be used for purchasing certificate will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Azure resource group name

  • name (String)

    Certificate name

  • certificate_distinguished_name (CertificateOrder)

    Distinguished name

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:



748
749
750
751
# File 'lib/azure_mgmt_web/certificate_orders.rb', line 748

def update_certificate_order(resource_group_name, name, certificate_distinguished_name, custom_headers = nil)
  response = update_certificate_order_async(resource_group_name, name, certificate_distinguished_name, custom_headers).value!
  response.body unless response.nil?
end

#update_certificate_order_async(resource_group_name, name, certificate_distinguished_name, custom_headers = nil) ⇒ Concurrent::Promise

Create or update a certificate purchase order

to be used for purchasing certificate to the HTTP request.

Parameters:

  • resource_group_name (String)

    Azure resource group name

  • name (String)

    Certificate name

  • certificate_distinguished_name (CertificateOrder)

    Distinguished name

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
# File 'lib/azure_mgmt_web/certificate_orders.rb', line 781

def update_certificate_order_async(resource_group_name, name, certificate_distinguished_name, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, 'certificate_distinguished_name is nil' if certificate_distinguished_name.nil?
  certificate_distinguished_name.validate unless certificate_distinguished_name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?

  # Serialize Request
  request_headers['Content-Type'] = 'application/json; charset=utf-8'
  unless certificate_distinguished_name.nil?
    certificate_distinguished_name = CertificateOrder.serialize_object(certificate_distinguished_name)
  end
  request_content = certificate_distinguished_name != nil ? JSON.generate(certificate_distinguished_name, quirks_mode: true) : nil
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}'
  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      body: request_content,
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

  request = MsRest::HttpOperationRequest.new(request_url, path_template, :patch, options)
  promise = request.run_promise do |req|
    @client.credentials.sign_request(req) unless @client.credentials.nil?
  end

  promise = promise.then do |http_response|
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
    end

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        unless parsed_response.nil?
          parsed_response = CertificateOrder.deserialize_object(parsed_response)
        end
        result.body = parsed_response
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#update_certificate_order_with_http_info(resource_group_name, name, certificate_distinguished_name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Create or update a certificate purchase order

to be used for purchasing certificate will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Azure resource group name

  • name (String)

    Certificate name

  • certificate_distinguished_name (CertificateOrder)

    Distinguished name

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



765
766
767
# File 'lib/azure_mgmt_web/certificate_orders.rb', line 765

def update_certificate_order_with_http_info(resource_group_name, name, certificate_distinguished_name, custom_headers = nil)
  update_certificate_order_async(resource_group_name, name, certificate_distinguished_name, custom_headers).value!
end

#update_certificate_with_http_info(resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Associates a Key Vault secret to a certificate store that will be used for storing the certificate once it’s ready

csm Id will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Azure resource group name

  • certificate_order_name (String)

    Certificate name

  • name (String)

    Certificate name

  • key_vault_certificate (CertificateOrderCertificate)

    Key Vault secret

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



366
367
368
# File 'lib/azure_mgmt_web/certificate_orders.rb', line 366

def update_certificate_with_http_info(resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers = nil)
  update_certificate_async(resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers).value!
end

#verify_domain_ownership(resource_group_name, name, custom_headers = nil) ⇒ Object

Verify domain ownership for this certificate order

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Azure resource group name

  • name (String)

    Certificate order name

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (Object)

    operation results.



1523
1524
1525
1526
# File 'lib/azure_mgmt_web/certificate_orders.rb', line 1523

def verify_domain_ownership(resource_group_name, name, custom_headers = nil)
  response = verify_domain_ownership_async(resource_group_name, name, custom_headers).value!
  response.body unless response.nil?
end

#verify_domain_ownership_async(resource_group_name, name, custom_headers = nil) ⇒ Concurrent::Promise

Verify domain ownership for this certificate order

to the HTTP request.

Parameters:

  • resource_group_name (String)

    Azure resource group name

  • name (String)

    Certificate order name

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
# File 'lib/azure_mgmt_web/certificate_orders.rb', line 1552

def verify_domain_ownership_async(resource_group_name, name, custom_headers = nil)
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
  fail ArgumentError, 'name is nil' if name.nil?
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
  request_headers = {}

  # Set Headers
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/verifyDomainOwnership'
  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
      query_params: {'api-version' => @client.api_version},
      headers: request_headers.merge(custom_headers || {})
  }

  request_url = @base_url || @client.base_url

  request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
  promise = request.run_promise do |req|
    @client.credentials.sign_request(req) unless @client.credentials.nil?
  end

  promise = promise.then do |http_response|
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200
      error_model = JSON.load(response_content)
      fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
    end

    # Create Result
    result = MsRestAzure::AzureOperationResponse.new(request, http_response)
    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?

    result
  end

  promise.execute
end

#verify_domain_ownership_with_http_info(resource_group_name, name, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Verify domain ownership for this certificate order

will be added to the HTTP request.

Parameters:

  • resource_group_name (String)

    Azure resource group name

  • name (String)

    Certificate order name

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1538
1539
1540
# File 'lib/azure_mgmt_web/certificate_orders.rb', line 1538

def verify_domain_ownership_with_http_info(resource_group_name, name, custom_headers = nil)
  verify_domain_ownership_async(resource_group_name, name, custom_headers).value!
end