azure_mgmt_key_vault 0.15.1 → 0.15.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2015-06-01/generated/azure_mgmt_key_vault/key_vault_management_client.rb +1 -3
  3. data/lib/2015-06-01/generated/azure_mgmt_key_vault/models/access_policy_entry.rb +5 -0
  4. data/lib/2015-06-01/generated/azure_mgmt_key_vault/models/permissions.rb +7 -0
  5. data/lib/2015-06-01/generated/azure_mgmt_key_vault/models/resource.rb +7 -0
  6. data/lib/2015-06-01/generated/azure_mgmt_key_vault/models/resource_list_result.rb +4 -0
  7. data/lib/2015-06-01/generated/azure_mgmt_key_vault/models/sku.rb +3 -0
  8. data/lib/2015-06-01/generated/azure_mgmt_key_vault/models/vault.rb +8 -0
  9. data/lib/2015-06-01/generated/azure_mgmt_key_vault/models/vault_create_or_update_parameters.rb +5 -0
  10. data/lib/2015-06-01/generated/azure_mgmt_key_vault/models/vault_list_result.rb +4 -0
  11. data/lib/2015-06-01/generated/azure_mgmt_key_vault/models/vault_properties.rb +10 -0
  12. data/lib/2015-06-01/generated/azure_mgmt_key_vault/vaults.rb +1 -0
  13. data/lib/2016-10-01/generated/azure_mgmt_key_vault/key_vault_management_client.rb +1 -3
  14. data/lib/2016-10-01/generated/azure_mgmt_key_vault/models/access_policy_entry.rb +5 -0
  15. data/lib/2016-10-01/generated/azure_mgmt_key_vault/models/deleted_vault.rb +5 -0
  16. data/lib/2016-10-01/generated/azure_mgmt_key_vault/models/deleted_vault_list_result.rb +4 -0
  17. data/lib/2016-10-01/generated/azure_mgmt_key_vault/models/deleted_vault_properties.rb +7 -0
  18. data/lib/2016-10-01/generated/azure_mgmt_key_vault/models/permissions.rb +9 -0
  19. data/lib/2016-10-01/generated/azure_mgmt_key_vault/models/resource.rb +7 -0
  20. data/lib/2016-10-01/generated/azure_mgmt_key_vault/models/resource_list_result.rb +4 -0
  21. data/lib/2016-10-01/generated/azure_mgmt_key_vault/models/sku.rb +3 -0
  22. data/lib/2016-10-01/generated/azure_mgmt_key_vault/models/vault.rb +8 -0
  23. data/lib/2016-10-01/generated/azure_mgmt_key_vault/models/vault_create_or_update_parameters.rb +5 -0
  24. data/lib/2016-10-01/generated/azure_mgmt_key_vault/models/vault_list_result.rb +4 -0
  25. data/lib/2016-10-01/generated/azure_mgmt_key_vault/models/vault_properties.rb +11 -0
  26. data/lib/2016-10-01/generated/azure_mgmt_key_vault/vaults.rb +1 -0
  27. data/lib/profiles/latest/keyvault_latest_profile_client.rb +1 -3
  28. data/lib/version.rb +1 -1
  29. metadata +10 -9
  30. data/lib/2015-06-01/generated/azure_mgmt_key_vault/version.rb +0 -8
  31. data/lib/2016-10-01/generated/azure_mgmt_key_vault/version.rb +0 -8
  32. data/lib/profiles/common/configurable.rb +0 -86
  33. data/lib/profiles/common/default.rb +0 -57
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 48513cdbce1aa78740997972aaffdc9caeb9a577
4
- data.tar.gz: 6b52ed55c66034785308410c09792db1756c04ee
3
+ metadata.gz: 5794cec9747d39ca13a0f24a92ee2eac570c1759
4
+ data.tar.gz: 6ec7ba8158d21623d2a021117e00dfe6366cd1b2
5
5
  SHA512:
6
- metadata.gz: ab87338bd26c11fec9231827ec065333e97a4d2dee5b2c315d49dae7e63bdbd11cdaaee9d7965db5bd3e2ff573402977a32fcd6981c0cd7d49d7f80f991c762a
7
- data.tar.gz: ccf3fe541c152b325c369960732574dd40904dcd69ef25098fe2e637a5bf61f018611196621d01480a43ce1e0806d3ec5153f870d3ee9bcf2c149f4fae1c507e
6
+ metadata.gz: 1fc2916b72d5a96be77c70e1b11ba2ee2f65bb3e9687b0321e03ba66bbc04511422cb6cd64645755f82da8314a114161e0289388ed2430db1f15ea63d0086abd
7
+ data.tar.gz: 635a11f978b4768a6d6f3999e5cca442fc10111aec8e9d90fc44ea30db0656f6a96e7726e09a2700b94387dff6d5ec8c0fd9f0fc1ad265b853f8e7e74210b4c0
@@ -122,9 +122,7 @@ module Azure::KeyVault::Mgmt::V2015_06_01
122
122
  #
123
123
  def add_telemetry
124
124
  sdk_information = 'azure_mgmt_key_vault'
125
- if defined? Azure::KeyVault::Mgmt::V2015_06_01::VERSION
126
- sdk_information = "#{sdk_information}/#{Azure::KeyVault::Mgmt::V2015_06_01::VERSION}"
127
- end
125
+ sdk_information = "#{sdk_information}/0.15.2"
128
126
  add_user_agent_information(sdk_information)
129
127
  end
130
128
  end
@@ -37,6 +37,7 @@ module Azure::KeyVault::Mgmt::V2015_06_01
37
37
  #
38
38
  def self.mapper()
39
39
  {
40
+ client_side_validation: true,
40
41
  required: false,
41
42
  serialized_name: 'AccessPolicyEntry',
42
43
  type: {
@@ -44,6 +45,7 @@ module Azure::KeyVault::Mgmt::V2015_06_01
44
45
  class_name: 'AccessPolicyEntry',
45
46
  model_properties: {
46
47
  tenant_id: {
48
+ client_side_validation: true,
47
49
  required: true,
48
50
  serialized_name: 'tenantId',
49
51
  type: {
@@ -51,6 +53,7 @@ module Azure::KeyVault::Mgmt::V2015_06_01
51
53
  }
52
54
  },
53
55
  object_id: {
56
+ client_side_validation: true,
54
57
  required: true,
55
58
  serialized_name: 'objectId',
56
59
  type: {
@@ -58,6 +61,7 @@ module Azure::KeyVault::Mgmt::V2015_06_01
58
61
  }
59
62
  },
60
63
  application_id: {
64
+ client_side_validation: true,
61
65
  required: false,
62
66
  serialized_name: 'applicationId',
63
67
  type: {
@@ -65,6 +69,7 @@ module Azure::KeyVault::Mgmt::V2015_06_01
65
69
  }
66
70
  },
67
71
  permissions: {
72
+ client_side_validation: true,
68
73
  required: true,
69
74
  serialized_name: 'permissions',
70
75
  type: {
@@ -28,6 +28,7 @@ module Azure::KeyVault::Mgmt::V2015_06_01
28
28
  #
29
29
  def self.mapper()
30
30
  {
31
+ client_side_validation: true,
31
32
  required: false,
32
33
  serialized_name: 'Permissions',
33
34
  type: {
@@ -35,11 +36,13 @@ module Azure::KeyVault::Mgmt::V2015_06_01
35
36
  class_name: 'Permissions',
36
37
  model_properties: {
37
38
  keys: {
39
+ client_side_validation: true,
38
40
  required: false,
39
41
  serialized_name: 'keys',
40
42
  type: {
41
43
  name: 'Sequence',
42
44
  element: {
45
+ client_side_validation: true,
43
46
  required: false,
44
47
  serialized_name: 'KeyPermissionsElementType',
45
48
  type: {
@@ -49,11 +52,13 @@ module Azure::KeyVault::Mgmt::V2015_06_01
49
52
  }
50
53
  },
51
54
  secrets: {
55
+ client_side_validation: true,
52
56
  required: false,
53
57
  serialized_name: 'secrets',
54
58
  type: {
55
59
  name: 'Sequence',
56
60
  element: {
61
+ client_side_validation: true,
57
62
  required: false,
58
63
  serialized_name: 'SecretPermissionsElementType',
59
64
  type: {
@@ -63,11 +68,13 @@ module Azure::KeyVault::Mgmt::V2015_06_01
63
68
  }
64
69
  },
65
70
  certificates: {
71
+ client_side_validation: true,
66
72
  required: false,
67
73
  serialized_name: 'certificates',
68
74
  type: {
69
75
  name: 'Sequence',
70
76
  element: {
77
+ client_side_validation: true,
71
78
  required: false,
72
79
  serialized_name: 'CertificatePermissionsElementType',
73
80
  type: {
@@ -37,6 +37,7 @@ module Azure::KeyVault::Mgmt::V2015_06_01
37
37
  #
38
38
  def self.mapper()
39
39
  {
40
+ client_side_validation: true,
40
41
  required: false,
41
42
  serialized_name: 'Resource',
42
43
  type: {
@@ -44,6 +45,7 @@ module Azure::KeyVault::Mgmt::V2015_06_01
44
45
  class_name: 'Resource',
45
46
  model_properties: {
46
47
  id: {
48
+ client_side_validation: true,
47
49
  required: false,
48
50
  read_only: true,
49
51
  serialized_name: 'id',
@@ -52,6 +54,7 @@ module Azure::KeyVault::Mgmt::V2015_06_01
52
54
  }
53
55
  },
54
56
  name: {
57
+ client_side_validation: true,
55
58
  required: true,
56
59
  serialized_name: 'name',
57
60
  type: {
@@ -59,6 +62,7 @@ module Azure::KeyVault::Mgmt::V2015_06_01
59
62
  }
60
63
  },
61
64
  type: {
65
+ client_side_validation: true,
62
66
  required: false,
63
67
  read_only: true,
64
68
  serialized_name: 'type',
@@ -67,6 +71,7 @@ module Azure::KeyVault::Mgmt::V2015_06_01
67
71
  }
68
72
  },
69
73
  location: {
74
+ client_side_validation: true,
70
75
  required: true,
71
76
  serialized_name: 'location',
72
77
  type: {
@@ -74,11 +79,13 @@ module Azure::KeyVault::Mgmt::V2015_06_01
74
79
  }
75
80
  },
76
81
  tags: {
82
+ client_side_validation: true,
77
83
  required: false,
78
84
  serialized_name: 'tags',
79
85
  type: {
80
86
  name: 'Dictionary',
81
87
  value: {
88
+ client_side_validation: true,
82
89
  required: false,
83
90
  serialized_name: 'StringElementType',
84
91
  type: {
@@ -57,6 +57,7 @@ module Azure::KeyVault::Mgmt::V2015_06_01
57
57
  #
58
58
  def self.mapper()
59
59
  {
60
+ client_side_validation: true,
60
61
  required: false,
61
62
  serialized_name: 'ResourceListResult',
62
63
  type: {
@@ -64,11 +65,13 @@ module Azure::KeyVault::Mgmt::V2015_06_01
64
65
  class_name: 'ResourceListResult',
65
66
  model_properties: {
66
67
  value: {
68
+ client_side_validation: true,
67
69
  required: false,
68
70
  serialized_name: 'value',
69
71
  type: {
70
72
  name: 'Sequence',
71
73
  element: {
74
+ client_side_validation: true,
72
75
  required: false,
73
76
  serialized_name: 'ResourceElementType',
74
77
  type: {
@@ -79,6 +82,7 @@ module Azure::KeyVault::Mgmt::V2015_06_01
79
82
  }
80
83
  },
81
84
  next_link: {
85
+ client_side_validation: true,
82
86
  required: false,
83
87
  serialized_name: 'nextLink',
84
88
  type: {
@@ -27,6 +27,7 @@ module Azure::KeyVault::Mgmt::V2015_06_01
27
27
  #
28
28
  def self.mapper()
29
29
  {
30
+ client_side_validation: true,
30
31
  required: false,
31
32
  serialized_name: 'Sku',
32
33
  type: {
@@ -34,6 +35,7 @@ module Azure::KeyVault::Mgmt::V2015_06_01
34
35
  class_name: 'Sku',
35
36
  model_properties: {
36
37
  family: {
38
+ client_side_validation: true,
37
39
  required: true,
38
40
  is_constant: true,
39
41
  serialized_name: 'family',
@@ -43,6 +45,7 @@ module Azure::KeyVault::Mgmt::V2015_06_01
43
45
  }
44
46
  },
45
47
  name: {
48
+ client_side_validation: true,
46
49
  required: true,
47
50
  serialized_name: 'name',
48
51
  type: {
@@ -22,6 +22,7 @@ module Azure::KeyVault::Mgmt::V2015_06_01
22
22
  #
23
23
  def self.mapper()
24
24
  {
25
+ client_side_validation: true,
25
26
  required: false,
26
27
  serialized_name: 'Vault',
27
28
  type: {
@@ -29,6 +30,7 @@ module Azure::KeyVault::Mgmt::V2015_06_01
29
30
  class_name: 'Vault',
30
31
  model_properties: {
31
32
  id: {
33
+ client_side_validation: true,
32
34
  required: false,
33
35
  read_only: true,
34
36
  serialized_name: 'id',
@@ -37,6 +39,7 @@ module Azure::KeyVault::Mgmt::V2015_06_01
37
39
  }
38
40
  },
39
41
  name: {
42
+ client_side_validation: true,
40
43
  required: true,
41
44
  serialized_name: 'name',
42
45
  type: {
@@ -44,6 +47,7 @@ module Azure::KeyVault::Mgmt::V2015_06_01
44
47
  }
45
48
  },
46
49
  type: {
50
+ client_side_validation: true,
47
51
  required: false,
48
52
  read_only: true,
49
53
  serialized_name: 'type',
@@ -52,6 +56,7 @@ module Azure::KeyVault::Mgmt::V2015_06_01
52
56
  }
53
57
  },
54
58
  location: {
59
+ client_side_validation: true,
55
60
  required: true,
56
61
  serialized_name: 'location',
57
62
  type: {
@@ -59,11 +64,13 @@ module Azure::KeyVault::Mgmt::V2015_06_01
59
64
  }
60
65
  },
61
66
  tags: {
67
+ client_side_validation: true,
62
68
  required: false,
63
69
  serialized_name: 'tags',
64
70
  type: {
65
71
  name: 'Dictionary',
66
72
  value: {
73
+ client_side_validation: true,
67
74
  required: false,
68
75
  serialized_name: 'StringElementType',
69
76
  type: {
@@ -73,6 +80,7 @@ module Azure::KeyVault::Mgmt::V2015_06_01
73
80
  }
74
81
  },
75
82
  properties: {
83
+ client_side_validation: true,
76
84
  required: true,
77
85
  serialized_name: 'properties',
78
86
  default_value: {},
@@ -30,6 +30,7 @@ module Azure::KeyVault::Mgmt::V2015_06_01
30
30
  #
31
31
  def self.mapper()
32
32
  {
33
+ client_side_validation: true,
33
34
  required: false,
34
35
  serialized_name: 'VaultCreateOrUpdateParameters',
35
36
  type: {
@@ -37,6 +38,7 @@ module Azure::KeyVault::Mgmt::V2015_06_01
37
38
  class_name: 'VaultCreateOrUpdateParameters',
38
39
  model_properties: {
39
40
  location: {
41
+ client_side_validation: true,
40
42
  required: true,
41
43
  serialized_name: 'location',
42
44
  type: {
@@ -44,11 +46,13 @@ module Azure::KeyVault::Mgmt::V2015_06_01
44
46
  }
45
47
  },
46
48
  tags: {
49
+ client_side_validation: true,
47
50
  required: false,
48
51
  serialized_name: 'tags',
49
52
  type: {
50
53
  name: 'Dictionary',
51
54
  value: {
55
+ client_side_validation: true,
52
56
  required: false,
53
57
  serialized_name: 'StringElementType',
54
58
  type: {
@@ -58,6 +62,7 @@ module Azure::KeyVault::Mgmt::V2015_06_01
58
62
  }
59
63
  },
60
64
  properties: {
65
+ client_side_validation: true,
61
66
  required: true,
62
67
  serialized_name: 'properties',
63
68
  default_value: {},
@@ -57,6 +57,7 @@ module Azure::KeyVault::Mgmt::V2015_06_01
57
57
  #
58
58
  def self.mapper()
59
59
  {
60
+ client_side_validation: true,
60
61
  required: false,
61
62
  serialized_name: 'VaultListResult',
62
63
  type: {
@@ -64,11 +65,13 @@ module Azure::KeyVault::Mgmt::V2015_06_01
64
65
  class_name: 'VaultListResult',
65
66
  model_properties: {
66
67
  value: {
68
+ client_side_validation: true,
67
69
  required: false,
68
70
  serialized_name: 'value',
69
71
  type: {
70
72
  name: 'Sequence',
71
73
  element: {
74
+ client_side_validation: true,
72
75
  required: false,
73
76
  serialized_name: 'VaultElementType',
74
77
  type: {
@@ -79,6 +82,7 @@ module Azure::KeyVault::Mgmt::V2015_06_01
79
82
  }
80
83
  },
81
84
  next_link: {
85
+ client_side_validation: true,
82
86
  required: false,
83
87
  serialized_name: 'nextLink',
84
88
  type: {
@@ -52,6 +52,7 @@ module Azure::KeyVault::Mgmt::V2015_06_01
52
52
  #
53
53
  def self.mapper()
54
54
  {
55
+ client_side_validation: true,
55
56
  required: false,
56
57
  serialized_name: 'VaultProperties',
57
58
  type: {
@@ -59,6 +60,7 @@ module Azure::KeyVault::Mgmt::V2015_06_01
59
60
  class_name: 'VaultProperties',
60
61
  model_properties: {
61
62
  vault_uri: {
63
+ client_side_validation: true,
62
64
  required: false,
63
65
  serialized_name: 'vaultUri',
64
66
  type: {
@@ -66,6 +68,7 @@ module Azure::KeyVault::Mgmt::V2015_06_01
66
68
  }
67
69
  },
68
70
  tenant_id: {
71
+ client_side_validation: true,
69
72
  required: true,
70
73
  serialized_name: 'tenantId',
71
74
  type: {
@@ -73,6 +76,7 @@ module Azure::KeyVault::Mgmt::V2015_06_01
73
76
  }
74
77
  },
75
78
  sku: {
79
+ client_side_validation: true,
76
80
  required: true,
77
81
  serialized_name: 'sku',
78
82
  default_value: {},
@@ -82,6 +86,7 @@ module Azure::KeyVault::Mgmt::V2015_06_01
82
86
  }
83
87
  },
84
88
  access_policies: {
89
+ client_side_validation: true,
85
90
  required: true,
86
91
  serialized_name: 'accessPolicies',
87
92
  constraints: {
@@ -90,6 +95,7 @@ module Azure::KeyVault::Mgmt::V2015_06_01
90
95
  type: {
91
96
  name: 'Sequence',
92
97
  element: {
98
+ client_side_validation: true,
93
99
  required: false,
94
100
  serialized_name: 'AccessPolicyEntryElementType',
95
101
  type: {
@@ -100,6 +106,7 @@ module Azure::KeyVault::Mgmt::V2015_06_01
100
106
  }
101
107
  },
102
108
  enabled_for_deployment: {
109
+ client_side_validation: true,
103
110
  required: false,
104
111
  serialized_name: 'enabledForDeployment',
105
112
  type: {
@@ -107,6 +114,7 @@ module Azure::KeyVault::Mgmt::V2015_06_01
107
114
  }
108
115
  },
109
116
  enabled_for_disk_encryption: {
117
+ client_side_validation: true,
110
118
  required: false,
111
119
  serialized_name: 'enabledForDiskEncryption',
112
120
  type: {
@@ -114,6 +122,7 @@ module Azure::KeyVault::Mgmt::V2015_06_01
114
122
  }
115
123
  },
116
124
  enabled_for_template_deployment: {
125
+ client_side_validation: true,
117
126
  required: false,
118
127
  serialized_name: 'enabledForTemplateDeployment',
119
128
  type: {
@@ -121,6 +130,7 @@ module Azure::KeyVault::Mgmt::V2015_06_01
121
130
  }
122
131
  },
123
132
  enable_soft_delete: {
133
+ client_side_validation: true,
124
134
  required: false,
125
135
  serialized_name: 'enableSoftDelete',
126
136
  type: {
@@ -73,6 +73,7 @@ module Azure::KeyVault::Mgmt::V2015_06_01
73
73
  def create_or_update_async(resource_group_name, vault_name, parameters, custom_headers = nil)
74
74
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
75
75
  fail ArgumentError, 'vault_name is nil' if vault_name.nil?
76
+ fail ArgumentError, "'vault_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9-]{3,24}$'" if !vault_name.nil? && vault_name.match(Regexp.new('^^[a-zA-Z0-9-]{3,24}$$')).nil?
76
77
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
77
78
  fail ArgumentError, 'parameters is nil' if parameters.nil?
78
79
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
@@ -122,9 +122,7 @@ module Azure::KeyVault::Mgmt::V2016_10_01
122
122
  #
123
123
  def add_telemetry
124
124
  sdk_information = 'azure_mgmt_key_vault'
125
- if defined? Azure::KeyVault::Mgmt::V2016_10_01::VERSION
126
- sdk_information = "#{sdk_information}/#{Azure::KeyVault::Mgmt::V2016_10_01::VERSION}"
127
- end
125
+ sdk_information = "#{sdk_information}/0.15.2"
128
126
  add_user_agent_information(sdk_information)
129
127
  end
130
128
  end
@@ -37,6 +37,7 @@ module Azure::KeyVault::Mgmt::V2016_10_01
37
37
  #
38
38
  def self.mapper()
39
39
  {
40
+ client_side_validation: true,
40
41
  required: false,
41
42
  serialized_name: 'AccessPolicyEntry',
42
43
  type: {
@@ -44,6 +45,7 @@ module Azure::KeyVault::Mgmt::V2016_10_01
44
45
  class_name: 'AccessPolicyEntry',
45
46
  model_properties: {
46
47
  tenant_id: {
48
+ client_side_validation: true,
47
49
  required: true,
48
50
  serialized_name: 'tenantId',
49
51
  type: {
@@ -51,6 +53,7 @@ module Azure::KeyVault::Mgmt::V2016_10_01
51
53
  }
52
54
  },
53
55
  object_id: {
56
+ client_side_validation: true,
54
57
  required: true,
55
58
  serialized_name: 'objectId',
56
59
  type: {
@@ -58,6 +61,7 @@ module Azure::KeyVault::Mgmt::V2016_10_01
58
61
  }
59
62
  },
60
63
  application_id: {
64
+ client_side_validation: true,
61
65
  required: false,
62
66
  serialized_name: 'applicationId',
63
67
  type: {
@@ -65,6 +69,7 @@ module Azure::KeyVault::Mgmt::V2016_10_01
65
69
  }
66
70
  },
67
71
  permissions: {
72
+ client_side_validation: true,
68
73
  required: true,
69
74
  serialized_name: 'permissions',
70
75
  type: {
@@ -31,6 +31,7 @@ module Azure::KeyVault::Mgmt::V2016_10_01
31
31
  #
32
32
  def self.mapper()
33
33
  {
34
+ client_side_validation: true,
34
35
  required: false,
35
36
  serialized_name: 'DeletedVault',
36
37
  type: {
@@ -38,6 +39,7 @@ module Azure::KeyVault::Mgmt::V2016_10_01
38
39
  class_name: 'DeletedVault',
39
40
  model_properties: {
40
41
  id: {
42
+ client_side_validation: true,
41
43
  required: false,
42
44
  read_only: true,
43
45
  serialized_name: 'id',
@@ -46,6 +48,7 @@ module Azure::KeyVault::Mgmt::V2016_10_01
46
48
  }
47
49
  },
48
50
  name: {
51
+ client_side_validation: true,
49
52
  required: false,
50
53
  read_only: true,
51
54
  serialized_name: 'name',
@@ -54,6 +57,7 @@ module Azure::KeyVault::Mgmt::V2016_10_01
54
57
  }
55
58
  },
56
59
  type: {
60
+ client_side_validation: true,
57
61
  required: false,
58
62
  read_only: true,
59
63
  serialized_name: 'type',
@@ -62,6 +66,7 @@ module Azure::KeyVault::Mgmt::V2016_10_01
62
66
  }
63
67
  },
64
68
  properties: {
69
+ client_side_validation: true,
65
70
  required: false,
66
71
  serialized_name: 'properties',
67
72
  type: {
@@ -57,6 +57,7 @@ module Azure::KeyVault::Mgmt::V2016_10_01
57
57
  #
58
58
  def self.mapper()
59
59
  {
60
+ client_side_validation: true,
60
61
  required: false,
61
62
  serialized_name: 'DeletedVaultListResult',
62
63
  type: {
@@ -64,11 +65,13 @@ module Azure::KeyVault::Mgmt::V2016_10_01
64
65
  class_name: 'DeletedVaultListResult',
65
66
  model_properties: {
66
67
  value: {
68
+ client_side_validation: true,
67
69
  required: false,
68
70
  serialized_name: 'value',
69
71
  type: {
70
72
  name: 'Sequence',
71
73
  element: {
74
+ client_side_validation: true,
72
75
  required: false,
73
76
  serialized_name: 'DeletedVaultElementType',
74
77
  type: {
@@ -79,6 +82,7 @@ module Azure::KeyVault::Mgmt::V2016_10_01
79
82
  }
80
83
  },
81
84
  next_link: {
85
+ client_side_validation: true,
82
86
  required: false,
83
87
  serialized_name: 'nextLink',
84
88
  type: {
@@ -34,6 +34,7 @@ module Azure::KeyVault::Mgmt::V2016_10_01
34
34
  #
35
35
  def self.mapper()
36
36
  {
37
+ client_side_validation: true,
37
38
  required: false,
38
39
  serialized_name: 'DeletedVaultProperties',
39
40
  type: {
@@ -41,6 +42,7 @@ module Azure::KeyVault::Mgmt::V2016_10_01
41
42
  class_name: 'DeletedVaultProperties',
42
43
  model_properties: {
43
44
  vault_id: {
45
+ client_side_validation: true,
44
46
  required: false,
45
47
  read_only: true,
46
48
  serialized_name: 'vaultId',
@@ -49,6 +51,7 @@ module Azure::KeyVault::Mgmt::V2016_10_01
49
51
  }
50
52
  },
51
53
  location: {
54
+ client_side_validation: true,
52
55
  required: false,
53
56
  read_only: true,
54
57
  serialized_name: 'location',
@@ -57,6 +60,7 @@ module Azure::KeyVault::Mgmt::V2016_10_01
57
60
  }
58
61
  },
59
62
  deletion_date: {
63
+ client_side_validation: true,
60
64
  required: false,
61
65
  read_only: true,
62
66
  serialized_name: 'deletionDate',
@@ -65,6 +69,7 @@ module Azure::KeyVault::Mgmt::V2016_10_01
65
69
  }
66
70
  },
67
71
  scheduled_purge_date: {
72
+ client_side_validation: true,
68
73
  required: false,
69
74
  read_only: true,
70
75
  serialized_name: 'scheduledPurgeDate',
@@ -73,12 +78,14 @@ module Azure::KeyVault::Mgmt::V2016_10_01
73
78
  }
74
79
  },
75
80
  tags: {
81
+ client_side_validation: true,
76
82
  required: false,
77
83
  read_only: true,
78
84
  serialized_name: 'tags',
79
85
  type: {
80
86
  name: 'Dictionary',
81
87
  value: {
88
+ client_side_validation: true,
82
89
  required: false,
83
90
  serialized_name: 'StringElementType',
84
91
  type: {
@@ -31,6 +31,7 @@ module Azure::KeyVault::Mgmt::V2016_10_01
31
31
  #
32
32
  def self.mapper()
33
33
  {
34
+ client_side_validation: true,
34
35
  required: false,
35
36
  serialized_name: 'Permissions',
36
37
  type: {
@@ -38,11 +39,13 @@ module Azure::KeyVault::Mgmt::V2016_10_01
38
39
  class_name: 'Permissions',
39
40
  model_properties: {
40
41
  keys: {
42
+ client_side_validation: true,
41
43
  required: false,
42
44
  serialized_name: 'keys',
43
45
  type: {
44
46
  name: 'Sequence',
45
47
  element: {
48
+ client_side_validation: true,
46
49
  required: false,
47
50
  serialized_name: 'KeyPermissionsElementType',
48
51
  type: {
@@ -52,11 +55,13 @@ module Azure::KeyVault::Mgmt::V2016_10_01
52
55
  }
53
56
  },
54
57
  secrets: {
58
+ client_side_validation: true,
55
59
  required: false,
56
60
  serialized_name: 'secrets',
57
61
  type: {
58
62
  name: 'Sequence',
59
63
  element: {
64
+ client_side_validation: true,
60
65
  required: false,
61
66
  serialized_name: 'SecretPermissionsElementType',
62
67
  type: {
@@ -66,11 +71,13 @@ module Azure::KeyVault::Mgmt::V2016_10_01
66
71
  }
67
72
  },
68
73
  certificates: {
74
+ client_side_validation: true,
69
75
  required: false,
70
76
  serialized_name: 'certificates',
71
77
  type: {
72
78
  name: 'Sequence',
73
79
  element: {
80
+ client_side_validation: true,
74
81
  required: false,
75
82
  serialized_name: 'CertificatePermissionsElementType',
76
83
  type: {
@@ -80,11 +87,13 @@ module Azure::KeyVault::Mgmt::V2016_10_01
80
87
  }
81
88
  },
82
89
  storage: {
90
+ client_side_validation: true,
83
91
  required: false,
84
92
  serialized_name: 'storage',
85
93
  type: {
86
94
  name: 'Sequence',
87
95
  element: {
96
+ client_side_validation: true,
88
97
  required: false,
89
98
  serialized_name: 'StoragePermissionsElementType',
90
99
  type: {
@@ -37,6 +37,7 @@ module Azure::KeyVault::Mgmt::V2016_10_01
37
37
  #
38
38
  def self.mapper()
39
39
  {
40
+ client_side_validation: true,
40
41
  required: false,
41
42
  serialized_name: 'Resource',
42
43
  type: {
@@ -44,6 +45,7 @@ module Azure::KeyVault::Mgmt::V2016_10_01
44
45
  class_name: 'Resource',
45
46
  model_properties: {
46
47
  id: {
48
+ client_side_validation: true,
47
49
  required: false,
48
50
  read_only: true,
49
51
  serialized_name: 'id',
@@ -52,6 +54,7 @@ module Azure::KeyVault::Mgmt::V2016_10_01
52
54
  }
53
55
  },
54
56
  name: {
57
+ client_side_validation: true,
55
58
  required: true,
56
59
  serialized_name: 'name',
57
60
  type: {
@@ -59,6 +62,7 @@ module Azure::KeyVault::Mgmt::V2016_10_01
59
62
  }
60
63
  },
61
64
  type: {
65
+ client_side_validation: true,
62
66
  required: false,
63
67
  read_only: true,
64
68
  serialized_name: 'type',
@@ -67,6 +71,7 @@ module Azure::KeyVault::Mgmt::V2016_10_01
67
71
  }
68
72
  },
69
73
  location: {
74
+ client_side_validation: true,
70
75
  required: true,
71
76
  serialized_name: 'location',
72
77
  type: {
@@ -74,11 +79,13 @@ module Azure::KeyVault::Mgmt::V2016_10_01
74
79
  }
75
80
  },
76
81
  tags: {
82
+ client_side_validation: true,
77
83
  required: false,
78
84
  serialized_name: 'tags',
79
85
  type: {
80
86
  name: 'Dictionary',
81
87
  value: {
88
+ client_side_validation: true,
82
89
  required: false,
83
90
  serialized_name: 'StringElementType',
84
91
  type: {
@@ -57,6 +57,7 @@ module Azure::KeyVault::Mgmt::V2016_10_01
57
57
  #
58
58
  def self.mapper()
59
59
  {
60
+ client_side_validation: true,
60
61
  required: false,
61
62
  serialized_name: 'ResourceListResult',
62
63
  type: {
@@ -64,11 +65,13 @@ module Azure::KeyVault::Mgmt::V2016_10_01
64
65
  class_name: 'ResourceListResult',
65
66
  model_properties: {
66
67
  value: {
68
+ client_side_validation: true,
67
69
  required: false,
68
70
  serialized_name: 'value',
69
71
  type: {
70
72
  name: 'Sequence',
71
73
  element: {
74
+ client_side_validation: true,
72
75
  required: false,
73
76
  serialized_name: 'ResourceElementType',
74
77
  type: {
@@ -79,6 +82,7 @@ module Azure::KeyVault::Mgmt::V2016_10_01
79
82
  }
80
83
  },
81
84
  next_link: {
85
+ client_side_validation: true,
82
86
  required: false,
83
87
  serialized_name: 'nextLink',
84
88
  type: {
@@ -27,6 +27,7 @@ module Azure::KeyVault::Mgmt::V2016_10_01
27
27
  #
28
28
  def self.mapper()
29
29
  {
30
+ client_side_validation: true,
30
31
  required: false,
31
32
  serialized_name: 'Sku',
32
33
  type: {
@@ -34,6 +35,7 @@ module Azure::KeyVault::Mgmt::V2016_10_01
34
35
  class_name: 'Sku',
35
36
  model_properties: {
36
37
  family: {
38
+ client_side_validation: true,
37
39
  required: true,
38
40
  is_constant: true,
39
41
  serialized_name: 'family',
@@ -43,6 +45,7 @@ module Azure::KeyVault::Mgmt::V2016_10_01
43
45
  }
44
46
  },
45
47
  name: {
48
+ client_side_validation: true,
46
49
  required: true,
47
50
  serialized_name: 'name',
48
51
  type: {
@@ -22,6 +22,7 @@ module Azure::KeyVault::Mgmt::V2016_10_01
22
22
  #
23
23
  def self.mapper()
24
24
  {
25
+ client_side_validation: true,
25
26
  required: false,
26
27
  serialized_name: 'Vault',
27
28
  type: {
@@ -29,6 +30,7 @@ module Azure::KeyVault::Mgmt::V2016_10_01
29
30
  class_name: 'Vault',
30
31
  model_properties: {
31
32
  id: {
33
+ client_side_validation: true,
32
34
  required: false,
33
35
  read_only: true,
34
36
  serialized_name: 'id',
@@ -37,6 +39,7 @@ module Azure::KeyVault::Mgmt::V2016_10_01
37
39
  }
38
40
  },
39
41
  name: {
42
+ client_side_validation: true,
40
43
  required: true,
41
44
  serialized_name: 'name',
42
45
  type: {
@@ -44,6 +47,7 @@ module Azure::KeyVault::Mgmt::V2016_10_01
44
47
  }
45
48
  },
46
49
  type: {
50
+ client_side_validation: true,
47
51
  required: false,
48
52
  read_only: true,
49
53
  serialized_name: 'type',
@@ -52,6 +56,7 @@ module Azure::KeyVault::Mgmt::V2016_10_01
52
56
  }
53
57
  },
54
58
  location: {
59
+ client_side_validation: true,
55
60
  required: true,
56
61
  serialized_name: 'location',
57
62
  type: {
@@ -59,11 +64,13 @@ module Azure::KeyVault::Mgmt::V2016_10_01
59
64
  }
60
65
  },
61
66
  tags: {
67
+ client_side_validation: true,
62
68
  required: false,
63
69
  serialized_name: 'tags',
64
70
  type: {
65
71
  name: 'Dictionary',
66
72
  value: {
73
+ client_side_validation: true,
67
74
  required: false,
68
75
  serialized_name: 'StringElementType',
69
76
  type: {
@@ -73,6 +80,7 @@ module Azure::KeyVault::Mgmt::V2016_10_01
73
80
  }
74
81
  },
75
82
  properties: {
83
+ client_side_validation: true,
76
84
  required: true,
77
85
  serialized_name: 'properties',
78
86
  default_value: {},
@@ -30,6 +30,7 @@ module Azure::KeyVault::Mgmt::V2016_10_01
30
30
  #
31
31
  def self.mapper()
32
32
  {
33
+ client_side_validation: true,
33
34
  required: false,
34
35
  serialized_name: 'VaultCreateOrUpdateParameters',
35
36
  type: {
@@ -37,6 +38,7 @@ module Azure::KeyVault::Mgmt::V2016_10_01
37
38
  class_name: 'VaultCreateOrUpdateParameters',
38
39
  model_properties: {
39
40
  location: {
41
+ client_side_validation: true,
40
42
  required: true,
41
43
  serialized_name: 'location',
42
44
  type: {
@@ -44,11 +46,13 @@ module Azure::KeyVault::Mgmt::V2016_10_01
44
46
  }
45
47
  },
46
48
  tags: {
49
+ client_side_validation: true,
47
50
  required: false,
48
51
  serialized_name: 'tags',
49
52
  type: {
50
53
  name: 'Dictionary',
51
54
  value: {
55
+ client_side_validation: true,
52
56
  required: false,
53
57
  serialized_name: 'StringElementType',
54
58
  type: {
@@ -58,6 +62,7 @@ module Azure::KeyVault::Mgmt::V2016_10_01
58
62
  }
59
63
  },
60
64
  properties: {
65
+ client_side_validation: true,
61
66
  required: true,
62
67
  serialized_name: 'properties',
63
68
  default_value: {},
@@ -57,6 +57,7 @@ module Azure::KeyVault::Mgmt::V2016_10_01
57
57
  #
58
58
  def self.mapper()
59
59
  {
60
+ client_side_validation: true,
60
61
  required: false,
61
62
  serialized_name: 'VaultListResult',
62
63
  type: {
@@ -64,11 +65,13 @@ module Azure::KeyVault::Mgmt::V2016_10_01
64
65
  class_name: 'VaultListResult',
65
66
  model_properties: {
66
67
  value: {
68
+ client_side_validation: true,
67
69
  required: false,
68
70
  serialized_name: 'value',
69
71
  type: {
70
72
  name: 'Sequence',
71
73
  element: {
74
+ client_side_validation: true,
72
75
  required: false,
73
76
  serialized_name: 'VaultElementType',
74
77
  type: {
@@ -79,6 +82,7 @@ module Azure::KeyVault::Mgmt::V2016_10_01
79
82
  }
80
83
  },
81
84
  next_link: {
85
+ client_side_validation: true,
82
86
  required: false,
83
87
  serialized_name: 'nextLink',
84
88
  type: {
@@ -58,6 +58,7 @@ module Azure::KeyVault::Mgmt::V2016_10_01
58
58
  #
59
59
  def self.mapper()
60
60
  {
61
+ client_side_validation: true,
61
62
  required: false,
62
63
  serialized_name: 'VaultProperties',
63
64
  type: {
@@ -65,6 +66,7 @@ module Azure::KeyVault::Mgmt::V2016_10_01
65
66
  class_name: 'VaultProperties',
66
67
  model_properties: {
67
68
  tenant_id: {
69
+ client_side_validation: true,
68
70
  required: true,
69
71
  serialized_name: 'tenantId',
70
72
  type: {
@@ -72,6 +74,7 @@ module Azure::KeyVault::Mgmt::V2016_10_01
72
74
  }
73
75
  },
74
76
  sku: {
77
+ client_side_validation: true,
75
78
  required: true,
76
79
  serialized_name: 'sku',
77
80
  default_value: {},
@@ -81,6 +84,7 @@ module Azure::KeyVault::Mgmt::V2016_10_01
81
84
  }
82
85
  },
83
86
  access_policies: {
87
+ client_side_validation: true,
84
88
  required: false,
85
89
  serialized_name: 'accessPolicies',
86
90
  constraints: {
@@ -89,6 +93,7 @@ module Azure::KeyVault::Mgmt::V2016_10_01
89
93
  type: {
90
94
  name: 'Sequence',
91
95
  element: {
96
+ client_side_validation: true,
92
97
  required: false,
93
98
  serialized_name: 'AccessPolicyEntryElementType',
94
99
  type: {
@@ -99,6 +104,7 @@ module Azure::KeyVault::Mgmt::V2016_10_01
99
104
  }
100
105
  },
101
106
  vault_uri: {
107
+ client_side_validation: true,
102
108
  required: false,
103
109
  serialized_name: 'vaultUri',
104
110
  type: {
@@ -106,6 +112,7 @@ module Azure::KeyVault::Mgmt::V2016_10_01
106
112
  }
107
113
  },
108
114
  enabled_for_deployment: {
115
+ client_side_validation: true,
109
116
  required: false,
110
117
  serialized_name: 'enabledForDeployment',
111
118
  type: {
@@ -113,6 +120,7 @@ module Azure::KeyVault::Mgmt::V2016_10_01
113
120
  }
114
121
  },
115
122
  enabled_for_disk_encryption: {
123
+ client_side_validation: true,
116
124
  required: false,
117
125
  serialized_name: 'enabledForDiskEncryption',
118
126
  type: {
@@ -120,6 +128,7 @@ module Azure::KeyVault::Mgmt::V2016_10_01
120
128
  }
121
129
  },
122
130
  enabled_for_template_deployment: {
131
+ client_side_validation: true,
123
132
  required: false,
124
133
  serialized_name: 'enabledForTemplateDeployment',
125
134
  type: {
@@ -127,6 +136,7 @@ module Azure::KeyVault::Mgmt::V2016_10_01
127
136
  }
128
137
  },
129
138
  enable_soft_delete: {
139
+ client_side_validation: true,
130
140
  required: false,
131
141
  serialized_name: 'enableSoftDelete',
132
142
  type: {
@@ -134,6 +144,7 @@ module Azure::KeyVault::Mgmt::V2016_10_01
134
144
  }
135
145
  },
136
146
  create_mode: {
147
+ client_side_validation: true,
137
148
  required: false,
138
149
  serialized_name: 'createMode',
139
150
  type: {
@@ -73,6 +73,7 @@ module Azure::KeyVault::Mgmt::V2016_10_01
73
73
  def create_or_update_async(resource_group_name, vault_name, parameters, custom_headers = nil)
74
74
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
75
75
  fail ArgumentError, 'vault_name is nil' if vault_name.nil?
76
+ fail ArgumentError, "'vault_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9-]{3,24}$'" if !vault_name.nil? && vault_name.match(Regexp.new('^^[a-zA-Z0-9-]{3,24}$$')).nil?
76
77
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
77
78
  fail ArgumentError, 'parameters is nil' if parameters.nil?
78
79
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
@@ -4,15 +4,13 @@
4
4
 
5
5
  require 'profiles/latest/keyvault_module_definition'
6
6
  require 'profiles/latest/modules/keyvault_profile_module'
7
- require 'profiles/common/configurable'
8
- require 'profiles/common/default'
9
7
 
10
8
  module Azure::KeyVault::Profiles::Latest::Mgmt
11
9
  #
12
10
  # Client class for the Latest profile SDK.
13
11
  #
14
12
  class Client < KeyVaultClass
15
- include Azure::Common::Configurable
13
+ include MsRestAzure::Common::Configurable
16
14
 
17
15
 
18
16
  def initialize(options = {})
data/lib/version.rb CHANGED
@@ -3,5 +3,5 @@
3
3
  # Licensed under the MIT License. See License.txt in the project root for license information.
4
4
 
5
5
  module Azure::KeyVault::Mgmt
6
- VERSION = '0.15.1'
6
+ VERSION = '0.15.2'
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: azure_mgmt_key_vault
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.1
4
+ version: 0.15.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Microsoft Corporation
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-30 00:00:00.000000000 Z
11
+ date: 2017-12-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 0.9.0
75
+ version: 0.10.0
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 0.9.0
82
+ version: 0.10.0
83
83
  description: Microsoft Azure Resource Management Key Vault Client Library for Ruby
84
84
  email: azrubyteam@microsoft.com
85
85
  executables: []
@@ -104,7 +104,6 @@ files:
104
104
  - lib/2015-06-01/generated/azure_mgmt_key_vault/models/vault_properties.rb
105
105
  - lib/2015-06-01/generated/azure_mgmt_key_vault/module_definition.rb
106
106
  - lib/2015-06-01/generated/azure_mgmt_key_vault/vaults.rb
107
- - lib/2015-06-01/generated/azure_mgmt_key_vault/version.rb
108
107
  - lib/2016-10-01/generated/azure_mgmt_key_vault.rb
109
108
  - lib/2016-10-01/generated/azure_mgmt_key_vault/key_vault_management_client.rb
110
109
  - lib/2016-10-01/generated/azure_mgmt_key_vault/models/access_policy_entry.rb
@@ -127,11 +126,8 @@ files:
127
126
  - lib/2016-10-01/generated/azure_mgmt_key_vault/models/vault_properties.rb
128
127
  - lib/2016-10-01/generated/azure_mgmt_key_vault/module_definition.rb
129
128
  - lib/2016-10-01/generated/azure_mgmt_key_vault/vaults.rb
130
- - lib/2016-10-01/generated/azure_mgmt_key_vault/version.rb
131
129
  - lib/azure_mgmt_key_vault.rb
132
130
  - lib/module_definition.rb
133
- - lib/profiles/common/configurable.rb
134
- - lib/profiles/common/default.rb
135
131
  - lib/profiles/latest/keyvault_latest_profile_client.rb
136
132
  - lib/profiles/latest/keyvault_module_definition.rb
137
133
  - lib/profiles/latest/modules/keyvault_profile_module.rb
@@ -139,7 +135,12 @@ files:
139
135
  homepage: https://aka.ms/azure-sdk-for-ruby
140
136
  licenses:
141
137
  - MIT
142
- metadata: {}
138
+ metadata:
139
+ bug_tracker_uri: https://github.com/Azure/azure-sdk-for-ruby/issues
140
+ changelog_uri: https://github.com/Azure/azure-sdk-for-ruby/blob/master/ChangeLog.md
141
+ documentation_uri: https://azure.microsoft.com/en-us/develop/ruby/
142
+ homepage_uri: https://aka.ms/azure-sdk-for-ruby
143
+ source_code_uri: https://github.com/Azure/azure-sdk-for-ruby/tree/master/management/azure_mgmt_key_vault
143
144
  post_install_message:
144
145
  rdoc_options: []
145
146
  require_paths:
@@ -1,8 +0,0 @@
1
- # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator.
3
- # Changes may cause incorrect behavior and will be lost if the code is
4
- # regenerated.
5
-
6
- module Azure::KeyVault::Mgmt::V2015_06_01
7
- VERSION = '0.15.1'
8
- end
@@ -1,8 +0,0 @@
1
- # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator.
3
- # Changes may cause incorrect behavior and will be lost if the code is
4
- # regenerated.
5
-
6
- module Azure::KeyVault::Mgmt::V2016_10_01
7
- VERSION = '0.15.1'
8
- end
@@ -1,86 +0,0 @@
1
- # encoding: utf-8
2
- # Copyright (c) Microsoft Corporation. All rights reserved.
3
- # Licensed under the MIT License. See License.txt in the project root for license information.
4
-
5
- module Azure::Common
6
- # The Azure::Common::Configurable module provides basic configuration for Azure activities.
7
- module Configurable
8
- # @return [String] Azure tenant id (also known as domain).
9
- attr_accessor :tenant_id
10
-
11
- # @return [String] Azure client id.
12
- attr_accessor :client_id
13
-
14
- # @return [String] Azure secret key.
15
- attr_accessor :client_secret
16
-
17
- # @return [String] Azure subscription id.
18
- attr_accessor :subscription_id
19
-
20
- # @return [MsRestAzure::ActiveDirectoryServiceSettings] Azure active directory service settings.
21
- attr_accessor :active_directory_settings
22
-
23
- # @return [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
24
- attr_accessor :credentials
25
-
26
- class << self
27
- #
28
- # List of configurable keys for {Azure::Common::Client}.
29
- # @return [Array] of option keys.
30
- #
31
- def keys
32
- @keys ||= [:tenant_id, :client_id, :client_secret, :subscription_id, :active_directory_settings]
33
- end
34
- end
35
-
36
- #
37
- # Set configuration options using a block.
38
- #
39
- def configure
40
- yield self
41
- end
42
-
43
- #
44
- # Resets the configurable options to provided options or defaults.
45
- # This will also creates MsRest::TokenCredentials to be used for subsequent Azure Resource Manager clients.
46
- #
47
- def reset!(options = {})
48
- Azure::Common::Configurable.keys.each do |key|
49
- default_value = Azure::Common::Default.options[key]
50
- instance_variable_set(:"@#{key}", options.fetch(key, default_value))
51
- end
52
-
53
- fail ArgumentError, 'tenant_id is nil' if self.tenant_id.nil?
54
- fail ArgumentError, 'client_id is nil' if self.client_id.nil?
55
- fail ArgumentError, 'client_secret is nil' if self.client_secret.nil?
56
- fail ArgumentError, 'subscription_id is nil' if self.subscription_id.nil?
57
- fail ArgumentError, 'active_directory_settings is nil' if self.active_directory_settings.nil?
58
-
59
- default_value = MsRest::TokenCredentials.new(
60
- MsRestAzure::ApplicationTokenProvider.new(
61
- self.tenant_id, self.client_id, self.client_secret, self.active_directory_settings))
62
-
63
- instance_variable_set(:"@credentials", options.fetch(:credentials, default_value))
64
-
65
- self
66
- end
67
-
68
- def config
69
- self
70
- end
71
-
72
- private
73
-
74
- #
75
- # configures configurable options to default values
76
- #
77
- def setup_default_options
78
- opts = {}
79
- Azure::Common::Configurable.keys.map do |key|
80
- opts[key] = Azure::Common::Default.options[key]
81
- end
82
-
83
- opts
84
- end
85
- end
86
- end
@@ -1,57 +0,0 @@
1
- # encoding: utf-8
2
- # Copyright (c) Microsoft Corporation. All rights reserved.
3
- # Licensed under the MIT License. See License.txt in the project root for license information.
4
-
5
- module Azure::Common
6
- module Default
7
- class << self
8
- #
9
- # Default Azure Tenant Id.
10
- # @return [String] Azure Tenant Id.
11
- #
12
- def tenant_id
13
- ENV['AZURE_TENANT_ID']
14
- end
15
-
16
- #
17
- # Default Azure Client Id.
18
- # @return [String] Azure Client Id.
19
- #
20
- def client_id
21
- ENV['AZURE_CLIENT_ID']
22
- end
23
-
24
- #
25
- # Default Azure Client Secret.
26
- # @return [String] Azure Client Secret.
27
- #
28
- def client_secret
29
- ENV['AZURE_CLIENT_SECRET']
30
- end
31
-
32
- #
33
- # Default Azure Subscription Id.
34
- # @return [String] Azure Subscription Id.
35
- #
36
- def subscription_id
37
- ENV['AZURE_SUBSCRIPTION_ID']
38
- end
39
-
40
- #
41
- # Default Azure Active Directory Service Settings.
42
- # @return [MsRestAzure::ActiveDirectoryServiceSettings] Azure Active Directory Service Settings.
43
- #
44
- def active_directory_settings
45
- MsRestAzure::ActiveDirectoryServiceSettings.get_azure_settings
46
- end
47
-
48
- #
49
- # Configuration options.
50
- # @return [Hash] Configuration options.
51
- #
52
- def options
53
- Hash[Azure::Common::Configurable.keys.map { |key| [key, send(key)]}]
54
- end
55
- end
56
- end
57
- end