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

Inherits:
Object
  • Object
show all
Includes:
Models, MsRestAzure
Defined in:
lib/generated/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/generated/azure_mgmt_web/certificate_orders.rb', line 25

def initialize(client)
  @client = client
end

Instance Attribute Details

#clientWebSiteManagementClient (readonly)

Returns reference to the WebSiteManagementClient.

Returns:



30
31
32
# File 'lib/generated/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/generated/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/generated/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?
  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?

  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Serialize Request
  request_mapper = CertificateOrderCertificate.mapper()
  request_content = @client.serialize(request_mapper,  key_vault_certificate, 'key_vault_certificate')
  request_content = request_content != nil ? JSON.generate(request_content, 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)
        result_mapper = CertificateOrderCertificate.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
      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:



558
559
560
561
# File 'lib/generated/azure_mgmt_web/certificate_orders.rb', line 558

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.



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
653
654
# File 'lib/generated/azure_mgmt_web/certificate_orders.rb', line 591

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?
  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?

  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Serialize Request
  request_mapper = CertificateOrder.mapper()
  request_content = @client.serialize(request_mapper,  certificate_distinguished_name, 'certificate_distinguished_name')
  request_content = request_content != nil ? JSON.generate(request_content, 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)
        result_mapper = CertificateOrder.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
      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.



575
576
577
# File 'lib/generated/azure_mgmt_web/certificate_orders.rb', line 575

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/generated/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/generated/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
332
333
# File 'lib/generated/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.



666
667
668
669
# File 'lib/generated/azure_mgmt_web/certificate_orders.rb', line 666

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.



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
735
736
737
738
# File 'lib/generated/azure_mgmt_web/certificate_orders.rb', line 695

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.



681
682
683
# File 'lib/generated/azure_mgmt_web/certificate_orders.rb', line 681

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/generated/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/generated/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/generated/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)
        result_mapper = CertificateOrderCertificate.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
      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:



462
463
464
465
# File 'lib/generated/azure_mgmt_web/certificate_orders.rb', line 462

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.



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
543
544
# File 'lib/generated/azure_mgmt_web/certificate_orders.rb', line 491

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)
        result_mapper = CertificateOrder.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
      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.



477
478
479
# File 'lib/generated/azure_mgmt_web/certificate_orders.rb', line 477

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) ⇒ Array<CertificateOrder>

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:



880
881
882
883
# File 'lib/generated/azure_mgmt_web/certificate_orders.rb', line 880

def get_certificate_orders(resource_group_name, custom_headers = nil)
  first_page = get_certificate_orders_as_lazy(resource_group_name, custom_headers)
  first_page.get_all_items
end

#get_certificate_orders_as_lazy(resource_group_name, custom_headers = nil) ⇒ CertificateOrderCollection

Get certificate orders in a resource group

will be added to the HTTP request.

the response.

Parameters:

  • resource_group_name (String)

    Azure resource group name

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

    A hash of custom headers that

Returns:



860
861
862
863
864
865
866
867
868
869
# File 'lib/generated/azure_mgmt_web/certificate_orders.rb', line 860

def get_certificate_orders_as_lazy(resource_group_name, custom_headers = nil)
  response = get_certificate_orders_async(resource_group_name, custom_headers).value!
  unless response.nil?
    page = response.body
    page.next_method = Proc.new do |next_link|
      get_certificate_orders_next_async(next_link, custom_headers)
    end
    page
  end
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.



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
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
# File 'lib/generated/azure_mgmt_web/certificate_orders.rb', line 907

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)
        result_mapper = CertificateOrderCollection.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
      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_next(next_page_link, custom_headers = nil) ⇒ CertificateOrderCollection

Get certificate orders in a resource group

call to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful

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

    A hash of custom headers that

Returns:



1675
1676
1677
1678
# File 'lib/generated/azure_mgmt_web/certificate_orders.rb', line 1675

def get_certificate_orders_next(next_page_link, custom_headers = nil)
  response = get_certificate_orders_next_async(next_page_link, custom_headers).value!
  response.body unless response.nil?
end

#get_certificate_orders_next_async(next_page_link, custom_headers = nil) ⇒ Concurrent::Promise

Get certificate orders in a resource group

call to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
# File 'lib/generated/azure_mgmt_web/certificate_orders.rb', line 1704

def get_certificate_orders_next_async(next_page_link, custom_headers = nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.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 = '{nextLink}'
  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nextLink' => next_page_link},
      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)
        result_mapper = CertificateOrderCollection.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
      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_next_with_http_info(next_page_link, custom_headers = nil) ⇒ MsRestAzure::AzureOperationResponse

Get certificate orders in a resource group

call to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1690
1691
1692
# File 'lib/generated/azure_mgmt_web/certificate_orders.rb', line 1690

def get_certificate_orders_next_with_http_info(next_page_link, custom_headers = nil)
  get_certificate_orders_next_async(next_page_link, custom_headers).value!
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.



894
895
896
# File 'lib/generated/azure_mgmt_web/certificate_orders.rb', line 894

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/generated/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) ⇒ Array<CertificateOrderCertificate>

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:



995
996
997
998
# File 'lib/generated/azure_mgmt_web/certificate_orders.rb', line 995

def get_certificates(resource_group_name, certificate_order_name, custom_headers = nil)
  first_page = get_certificates_as_lazy(resource_group_name, certificate_order_name, custom_headers)
  first_page.get_all_items
end

#get_certificates_as_lazy(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.

pages of the response.

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:



973
974
975
976
977
978
979
980
981
982
# File 'lib/generated/azure_mgmt_web/certificate_orders.rb', line 973

def get_certificates_as_lazy(resource_group_name, certificate_order_name, custom_headers = nil)
  response = get_certificates_async(resource_group_name, certificate_order_name, custom_headers).value!
  unless response.nil?
    page = response.body
    page.next_method = Proc.new do |next_link|
      get_certificates_next_async(next_link, custom_headers)
    end
    page
  end
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.



1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
# File 'lib/generated/azure_mgmt_web/certificate_orders.rb', line 1026

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)
        result_mapper = CertificateOrderCertificateCollection.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
      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_next(next_page_link, custom_headers = nil) ⇒ CertificateOrderCertificateCollection

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

call to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful

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

    A hash of custom headers that

Returns:



1766
1767
1768
1769
# File 'lib/generated/azure_mgmt_web/certificate_orders.rb', line 1766

def get_certificates_next(next_page_link, custom_headers = nil)
  response = get_certificates_next_async(next_page_link, custom_headers).value!
  response.body unless response.nil?
end

#get_certificates_next_async(next_page_link, 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)

call to List operation. to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
# File 'lib/generated/azure_mgmt_web/certificate_orders.rb', line 1797

def get_certificates_next_async(next_page_link, custom_headers = nil)
  fail ArgumentError, 'next_page_link is nil' if next_page_link.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 = '{nextLink}'
  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'nextLink' => next_page_link},
      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)
        result_mapper = CertificateOrderCertificateCollection.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
      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_next_with_http_info(next_page_link, 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)

call to List operation. will be added to the HTTP request.

Parameters:

  • next_page_link (String)

    The NextLink from the previous successful

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



1782
1783
1784
# File 'lib/generated/azure_mgmt_web/certificate_orders.rb', line 1782

def get_certificates_next_with_http_info(next_page_link, custom_headers = nil)
  get_certificates_next_async(next_page_link, custom_headers).value!
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.



1011
1012
1013
# File 'lib/generated/azure_mgmt_web/certificate_orders.rb', line 1011

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.



1093
1094
1095
1096
# File 'lib/generated/azure_mgmt_web/certificate_orders.rb', line 1093

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.



1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
# File 'lib/generated/azure_mgmt_web/certificate_orders.rb', line 1126

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?
  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?

  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Serialize Request
  request_mapper = ReissueCertificateOrderRequest.mapper()
  request_content = @client.serialize(request_mapper,  reissue_certificate_order_request, 'reissue_certificate_order_request')
  request_content = request_content != nil ? JSON.generate(request_content, 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.



1110
1111
1112
# File 'lib/generated/azure_mgmt_web/certificate_orders.rb', line 1110

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.



1193
1194
1195
1196
# File 'lib/generated/azure_mgmt_web/certificate_orders.rb', line 1193

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.



1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
# File 'lib/generated/azure_mgmt_web/certificate_orders.rb', line 1226

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?
  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?

  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Serialize Request
  request_mapper = RenewCertificateOrderRequest.mapper()
  request_content = @client.serialize(request_mapper,  renew_certificate_order_request, 'renew_certificate_order_request')
  request_content = request_content != nil ? JSON.generate(request_content, 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.



1210
1211
1212
# File 'lib/generated/azure_mgmt_web/certificate_orders.rb', line 1210

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.



1507
1508
1509
1510
# File 'lib/generated/azure_mgmt_web/certificate_orders.rb', line 1507

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.



1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
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
# File 'lib/generated/azure_mgmt_web/certificate_orders.rb', line 1536

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.



1522
1523
1524
# File 'lib/generated/azure_mgmt_web/certificate_orders.rb', line 1522

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.



1291
1292
1293
1294
# File 'lib/generated/azure_mgmt_web/certificate_orders.rb', line 1291

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.



1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
# File 'lib/generated/azure_mgmt_web/certificate_orders.rb', line 1320

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)
        result_mapper = {
          required: false,
          serialized_name: 'parsed_response',
          type: {
            name: 'Sequence',
            element: {
                required: false,
                serialized_name: 'CertificateOrderActionElementType',
                type: {
                  name: 'Composite',
                  class_name: 'CertificateOrderAction'
                }
            }
          }
        }
        result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
      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.



1306
1307
1308
# File 'lib/generated/azure_mgmt_web/certificate_orders.rb', line 1306

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.



1399
1400
1401
1402
# File 'lib/generated/azure_mgmt_web/certificate_orders.rb', line 1399

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.



1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
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
# File 'lib/generated/azure_mgmt_web/certificate_orders.rb', line 1428

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)
        result_mapper = {
          required: false,
          serialized_name: 'parsed_response',
          type: {
            name: 'Sequence',
            element: {
                required: false,
                serialized_name: 'CertificateEmailElementType',
                type: {
                  name: 'Composite',
                  class_name: 'CertificateEmail'
                }
            }
          }
        }
        result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
      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.



1414
1415
1416
# File 'lib/generated/azure_mgmt_web/certificate_orders.rb', line 1414

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:



349
350
351
352
# File 'lib/generated/azure_mgmt_web/certificate_orders.rb', line 349

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.



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
449
450
# File 'lib/generated/azure_mgmt_web/certificate_orders.rb', line 386

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?
  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?

  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Serialize Request
  request_mapper = CertificateOrderCertificate.mapper()
  request_content = @client.serialize(request_mapper,  key_vault_certificate, 'key_vault_certificate')
  request_content = request_content != nil ? JSON.generate(request_content, 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)
        result_mapper = CertificateOrderCertificate.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
      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:



752
753
754
755
# File 'lib/generated/azure_mgmt_web/certificate_orders.rb', line 752

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.



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
845
846
847
848
# File 'lib/generated/azure_mgmt_web/certificate_orders.rb', line 785

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?
  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?

  request_headers['Content-Type'] = 'application/json; charset=utf-8'

  # Serialize Request
  request_mapper = CertificateOrder.mapper()
  request_content = @client.serialize(request_mapper,  certificate_distinguished_name, 'certificate_distinguished_name')
  request_content = request_content != nil ? JSON.generate(request_content, 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)
        result_mapper = CertificateOrder.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
      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.



769
770
771
# File 'lib/generated/azure_mgmt_web/certificate_orders.rb', line 769

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.



368
369
370
# File 'lib/generated/azure_mgmt_web/certificate_orders.rb', line 368

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.



1591
1592
1593
1594
# File 'lib/generated/azure_mgmt_web/certificate_orders.rb', line 1591

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.



1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
# File 'lib/generated/azure_mgmt_web/certificate_orders.rb', line 1620

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.



1606
1607
1608
# File 'lib/generated/azure_mgmt_web/certificate_orders.rb', line 1606

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