Class: Azure::ServiceFabric::V6_5_0_36::MeshSecretValue

Inherits:
Object
  • Object
show all
Includes:
MsRestAzure
Defined in:
lib/6.5.0.36/generated/azure_service_fabric/mesh_secret_value.rb

Overview

Service Fabric REST Client APIs allows management of Service Fabric clusters, applications and services.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ MeshSecretValue

Creates and initializes a new instance of the MeshSecretValue class.

Parameters:

  • client

    service class for accessing basic functionality.



18
19
20
# File 'lib/6.5.0.36/generated/azure_service_fabric/mesh_secret_value.rb', line 18

def initialize(client)
  @client = client
end

Instance Attribute Details

#clientServiceFabricClientAPIs (readonly)

Returns reference to the ServiceFabricClientAPIs.

Returns:



23
24
25
# File 'lib/6.5.0.36/generated/azure_service_fabric/mesh_secret_value.rb', line 23

def client
  @client
end

Instance Method Details

#add_value(secret_resource_name, secret_value_resource_name, secret_value_resource_description, custom_headers: nil) ⇒ SecretValueResourceDescription

Adds the specified value as a new version of the specified secret resource.

Creates a new value of the specified secret resource. The name of the value is typically the version identifier. Once created the value cannot be changed.

value which is typically the version identifier for the value. Description for creating a value of a secret resource. will be added to the HTTP request.

Parameters:

  • secret_resource_name (String)

    The name of the secret resource.

  • secret_value_resource_name (String)

    The name of the secret resource

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

    A hash of custom headers that

Returns:

  • (SecretValueResourceDescription)

    operation results.



42
43
44
45
# File 'lib/6.5.0.36/generated/azure_service_fabric/mesh_secret_value.rb', line 42

def add_value(secret_resource_name, secret_value_resource_name, secret_value_resource_description, custom_headers:nil)
  response = add_value_async(secret_resource_name, secret_value_resource_name, secret_value_resource_description, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#add_value_async(secret_resource_name, secret_value_resource_name, secret_value_resource_description, custom_headers: nil) ⇒ Concurrent::Promise

Adds the specified value as a new version of the specified secret resource.

Creates a new value of the specified secret resource. The name of the value is typically the version identifier. Once created the value cannot be changed.

value which is typically the version identifier for the value. Description for creating a value of a secret resource. to the HTTP request.

Parameters:

  • secret_resource_name (String)

    The name of the secret resource.

  • secret_value_resource_name (String)

    The name of the secret resource

  • secret_value_resource_description (SecretValueResourceDescription)
  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
# File 'lib/6.5.0.36/generated/azure_service_fabric/mesh_secret_value.rb', line 85

def add_value_async(secret_resource_name, secret_value_resource_name, secret_value_resource_description, custom_headers:nil)
  api_version = '6.4-preview'
  fail ArgumentError, 'secret_resource_name is nil' if secret_resource_name.nil?
  fail ArgumentError, 'secret_value_resource_name is nil' if secret_value_resource_name.nil?
  fail ArgumentError, 'secret_value_resource_description is nil' if secret_value_resource_description.nil?


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

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

  # Serialize Request
  request_mapper = Azure::ServiceFabric::V6_5_0_36::Models::SecretValueResourceDescription.mapper()
  request_content = @client.serialize(request_mapper,  secret_value_resource_description)
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

  path_template = 'Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'secretResourceName' => secret_resource_name,'secretValueResourceName' => secret_value_resource_name},
      query_params: {'api-version' => api_version},
      body: request_content,
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:put, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 201 || status_code == 202
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::ServiceFabric::V6_5_0_36::Models::SecretValueResourceDescription.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end
    # Deserialize Response
    if status_code == 201
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::ServiceFabric::V6_5_0_36::Models::SecretValueResourceDescription.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#add_value_with_http_info(secret_resource_name, secret_value_resource_name, secret_value_resource_description, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Adds the specified value as a new version of the specified secret resource.

Creates a new value of the specified secret resource. The name of the value is typically the version identifier. Once created the value cannot be changed.

value which is typically the version identifier for the value. Description for creating a value of a secret resource. will be added to the HTTP request.

Parameters:

  • secret_resource_name (String)

    The name of the secret resource.

  • secret_value_resource_name (String)

    The name of the secret resource

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



64
65
66
# File 'lib/6.5.0.36/generated/azure_service_fabric/mesh_secret_value.rb', line 64

def add_value_with_http_info(secret_resource_name, secret_value_resource_name, secret_value_resource_description, custom_headers:nil)
  add_value_async(secret_resource_name, secret_value_resource_name, secret_value_resource_description, custom_headers:custom_headers).value!
end

#delete(secret_resource_name, secret_value_resource_name, custom_headers: nil) ⇒ Object

Deletes the specified value of the named secret resource.

Deletes the secret value resource identified by the name. The name of the resource is typically the version associated with that value. Deletion will fail if the specified value is in use.

value which is typically the version identifier for the value. will be added to the HTTP request.

Parameters:

  • secret_resource_name (String)

    The name of the secret resource.

  • secret_value_resource_name (String)

    The name of the secret resource

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

    A hash of custom headers that



276
277
278
279
# File 'lib/6.5.0.36/generated/azure_service_fabric/mesh_secret_value.rb', line 276

def delete(secret_resource_name, secret_value_resource_name, custom_headers:nil)
  response = delete_async(secret_resource_name, secret_value_resource_name, custom_headers:custom_headers).value!
  nil
end

#delete_async(secret_resource_name, secret_value_resource_name, custom_headers: nil) ⇒ Concurrent::Promise

Deletes the specified value of the named secret resource.

Deletes the secret value resource identified by the name. The name of the resource is typically the version associated with that value. Deletion will fail if the specified value is in use.

value which is typically the version identifier for the value. to the HTTP request.

Parameters:

  • secret_resource_name (String)

    The name of the secret resource.

  • secret_value_resource_name (String)

    The name of the secret resource

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
# File 'lib/6.5.0.36/generated/azure_service_fabric/mesh_secret_value.rb', line 315

def delete_async(secret_resource_name, secret_value_resource_name, custom_headers:nil)
  api_version = '6.4-preview'
  fail ArgumentError, 'secret_resource_name is nil' if secret_resource_name.nil?
  fail ArgumentError, 'secret_value_resource_name is nil' if secret_value_resource_name.nil?


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

  # 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 = 'Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'secretResourceName' => secret_resource_name,'secretValueResourceName' => secret_value_resource_name},
      query_params: {'api-version' => api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:delete, path_template, options)

  promise = promise.then do |result|
    http_response = result.response
    status_code = http_response.status
    response_content = http_response.body
    unless status_code == 200 || status_code == 202 || status_code == 204
      error_model = JSON.load(response_content)
      fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
    end

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?

    result
  end

  promise.execute
end

#delete_with_http_info(secret_resource_name, secret_value_resource_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Deletes the specified value of the named secret resource.

Deletes the secret value resource identified by the name. The name of the resource is typically the version associated with that value. Deletion will fail if the specified value is in use.

value which is typically the version identifier for the value. will be added to the HTTP request.

Parameters:

  • secret_resource_name (String)

    The name of the secret resource.

  • secret_value_resource_name (String)

    The name of the secret resource

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



296
297
298
# File 'lib/6.5.0.36/generated/azure_service_fabric/mesh_secret_value.rb', line 296

def delete_with_http_info(secret_resource_name, secret_value_resource_name, custom_headers:nil)
  delete_async(secret_resource_name, secret_value_resource_name, custom_headers:custom_headers).value!
end

#get(secret_resource_name, secret_value_resource_name, custom_headers: nil) ⇒ SecretValueResourceDescription

Gets the specified secret value resource.

Get the information about the specified named secret value resources. The information does not include the actual value of the secret.

value which is typically the version identifier for the value. will be added to the HTTP request.

Parameters:

  • secret_resource_name (String)

    The name of the secret resource.

  • secret_value_resource_name (String)

    The name of the secret resource

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

    A hash of custom headers that

Returns:

  • (SecretValueResourceDescription)

    operation results.



171
172
173
174
# File 'lib/6.5.0.36/generated/azure_service_fabric/mesh_secret_value.rb', line 171

def get(secret_resource_name, secret_value_resource_name, custom_headers:nil)
  response = get_async(secret_resource_name, secret_value_resource_name, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#get_async(secret_resource_name, secret_value_resource_name, custom_headers: nil) ⇒ Concurrent::Promise

Gets the specified secret value resource.

Get the information about the specified named secret value resources. The information does not include the actual value of the secret.

value which is typically the version identifier for the value. to the HTTP request.

Parameters:

  • secret_resource_name (String)

    The name of the secret resource.

  • secret_value_resource_name (String)

    The name of the secret resource

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



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
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
# File 'lib/6.5.0.36/generated/azure_service_fabric/mesh_secret_value.rb', line 208

def get_async(secret_resource_name, secret_value_resource_name, custom_headers:nil)
  api_version = '6.4-preview'
  fail ArgumentError, 'secret_resource_name is nil' if secret_resource_name.nil?
  fail ArgumentError, 'secret_value_resource_name is nil' if secret_value_resource_name.nil?


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

  # 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 = 'Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'secretResourceName' => secret_resource_name,'secretValueResourceName' => secret_value_resource_name},
      query_params: {'api-version' => api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

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

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::ServiceFabric::V6_5_0_36::Models::SecretValueResourceDescription.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#get_with_http_info(secret_resource_name, secret_value_resource_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Gets the specified secret value resource.

Get the information about the specified named secret value resources. The information does not include the actual value of the secret.

value which is typically the version identifier for the value. will be added to the HTTP request.

Parameters:

  • secret_resource_name (String)

    The name of the secret resource.

  • secret_value_resource_name (String)

    The name of the secret resource

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



190
191
192
# File 'lib/6.5.0.36/generated/azure_service_fabric/mesh_secret_value.rb', line 190

def get_with_http_info(secret_resource_name, secret_value_resource_name, custom_headers:nil)
  get_async(secret_resource_name, secret_value_resource_name, custom_headers:custom_headers).value!
end

#list(secret_resource_name, custom_headers: nil) ⇒ PagedSecretValueResourceDescriptionList

List names of all values of the specified secret resource.

Gets information about all secret value resources of the specified secret resource. The information includes the names of the secret value resources, but not the actual values.

will be added to the HTTP request.

Parameters:

  • secret_resource_name (String)

    The name of the secret resource.

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

    A hash of custom headers that

Returns:

  • (PagedSecretValueResourceDescriptionList)

    operation results.



372
373
374
375
# File 'lib/6.5.0.36/generated/azure_service_fabric/mesh_secret_value.rb', line 372

def list(secret_resource_name, custom_headers:nil)
  response = list_async(secret_resource_name, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#list_async(secret_resource_name, custom_headers: nil) ⇒ Concurrent::Promise

List names of all values of the specified secret resource.

Gets information about all secret value resources of the specified secret resource. The information includes the names of the secret value resources, but not the actual values.

to the HTTP request.

Parameters:

  • secret_resource_name (String)

    The name of the secret resource.

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



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
451
452
453
454
455
456
457
458
# File 'lib/6.5.0.36/generated/azure_service_fabric/mesh_secret_value.rb', line 407

def list_async(secret_resource_name, custom_headers:nil)
  api_version = '6.4-preview'
  fail ArgumentError, 'secret_resource_name is nil' if secret_resource_name.nil?


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

  # 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 = 'Resources/Secrets/{secretResourceName}/values'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'secretResourceName' => secret_resource_name},
      query_params: {'api-version' => api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:get, path_template, options)

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

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::ServiceFabric::V6_5_0_36::Models::PagedSecretValueResourceDescriptionList.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#list_with_http_info(secret_resource_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

List names of all values of the specified secret resource.

Gets information about all secret value resources of the specified secret resource. The information includes the names of the secret value resources, but not the actual values.

will be added to the HTTP request.

Parameters:

  • secret_resource_name (String)

    The name of the secret resource.

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



390
391
392
# File 'lib/6.5.0.36/generated/azure_service_fabric/mesh_secret_value.rb', line 390

def list_with_http_info(secret_resource_name, custom_headers:nil)
  list_async(secret_resource_name, custom_headers:custom_headers).value!
end

#show(secret_resource_name, secret_value_resource_name, custom_headers: nil) ⇒ SecretValue

Lists the specified value of the secret resource.

Lists the decrypted value of the specified named value of the secret resource. This is a privileged operation.

value which is typically the version identifier for the value. will be added to the HTTP request.

Parameters:

  • secret_resource_name (String)

    The name of the secret resource.

  • secret_value_resource_name (String)

    The name of the secret resource

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

    A hash of custom headers that

Returns:

  • (SecretValue)

    operation results.



474
475
476
477
# File 'lib/6.5.0.36/generated/azure_service_fabric/mesh_secret_value.rb', line 474

def show(secret_resource_name, secret_value_resource_name, custom_headers:nil)
  response = show_async(secret_resource_name, secret_value_resource_name, custom_headers:custom_headers).value!
  response.body unless response.nil?
end

#show_async(secret_resource_name, secret_value_resource_name, custom_headers: nil) ⇒ Concurrent::Promise

Lists the specified value of the secret resource.

Lists the decrypted value of the specified named value of the secret resource. This is a privileged operation.

value which is typically the version identifier for the value. to the HTTP request.

Parameters:

  • secret_resource_name (String)

    The name of the secret resource.

  • secret_value_resource_name (String)

    The name of the secret resource

  • A (Hash{String => String})

    hash of custom headers that will be added

Returns:

  • (Concurrent::Promise)

    Promise object which holds the HTTP response.



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
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
# File 'lib/6.5.0.36/generated/azure_service_fabric/mesh_secret_value.rb', line 511

def show_async(secret_resource_name, secret_value_resource_name, custom_headers:nil)
  api_version = '6.4-preview'
  fail ArgumentError, 'secret_resource_name is nil' if secret_resource_name.nil?
  fail ArgumentError, 'secret_value_resource_name is nil' if secret_value_resource_name.nil?


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

  # 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 = 'Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}/list_value'

  request_url = @base_url || @client.base_url

  options = {
      middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
      skip_encoding_path_params: {'secretResourceName' => secret_resource_name,'secretValueResourceName' => secret_value_resource_name},
      query_params: {'api-version' => api_version},
      headers: request_headers.merge(custom_headers || {}),
      base_url: request_url
  }
  promise = @client.make_request_async(:post, path_template, options)

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

    result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
    result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
    result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
    # Deserialize Response
    if status_code == 200
      begin
        parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
        result_mapper = Azure::ServiceFabric::V6_5_0_36::Models::SecretValue.mapper()
        result.body = @client.deserialize(result_mapper, parsed_response)
      rescue Exception => e
        fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
      end
    end

    result
  end

  promise.execute
end

#show_with_http_info(secret_resource_name, secret_value_resource_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse

Lists the specified value of the secret resource.

Lists the decrypted value of the specified named value of the secret resource. This is a privileged operation.

value which is typically the version identifier for the value. will be added to the HTTP request.

Parameters:

  • secret_resource_name (String)

    The name of the secret resource.

  • secret_value_resource_name (String)

    The name of the secret resource

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

    A hash of custom headers that

Returns:

  • (MsRestAzure::AzureOperationResponse)

    HTTP response information.



493
494
495
# File 'lib/6.5.0.36/generated/azure_service_fabric/mesh_secret_value.rb', line 493

def show_with_http_info(secret_resource_name, secret_value_resource_name, custom_headers:nil)
  show_async(secret_resource_name, secret_value_resource_name, custom_headers:custom_headers).value!
end