Class: Azure::ApiManagement::Mgmt::V2016_10_10::ApiManagementClient
- Inherits:
-
MsRestAzure::AzureServiceClient
- Object
- MsRestAzure::AzureServiceClient
- Azure::ApiManagement::Mgmt::V2016_10_10::ApiManagementClient
- Includes:
- MsRestAzure, MsRestAzure::Serialization
- Defined in:
- lib/2016-10-10/generated/azure_mgmt_api_management/api_management_client.rb
Overview
A service client - single point of access to the REST API.
Instance Attribute Summary collapse
-
#accept_language ⇒ String
The preferred language for the response.
-
#api_export ⇒ ApiExport
readonly
Api_export.
-
#api_management_operations ⇒ ApiManagementOperations
readonly
Api_management_operations.
-
#api_management_services ⇒ ApiManagementServices
readonly
Api_management_services.
-
#api_operations ⇒ ApiOperations
readonly
Api_operations.
-
#api_operations_policy ⇒ ApiOperationsPolicy
readonly
Api_operations_policy.
-
#api_policy ⇒ ApiPolicy
readonly
Api_policy.
-
#api_products ⇒ ApiProducts
readonly
Api_products.
-
#api_version ⇒ String
readonly
Version of the API to be used with the client request.
-
#apis ⇒ Apis
readonly
Apis.
-
#authorization_servers ⇒ AuthorizationServers
readonly
Authorization_servers.
-
#backends ⇒ Backends
readonly
Backends.
-
#base_url ⇒ String
The base URI of the service.
-
#certificates ⇒ Certificates
readonly
Certificates.
-
#credentials ⇒ Object
readonly
Credentials needed for the client to connect to Azure.
-
#generate_client_request_id ⇒ Boolean
generated.
-
#group_users ⇒ GroupUsers
readonly
Group_users.
-
#groups ⇒ Groups
readonly
Groups.
-
#identity_providers ⇒ IdentityProviders
readonly
Identity_providers.
-
#loggers ⇒ Loggers
readonly
Loggers.
-
#long_running_operation_retry_timeout ⇒ Integer
Operations.
-
#network_status ⇒ NetworkStatus
readonly
Network_status.
-
#open_id_connect_providers ⇒ OpenIdConnectProviders
readonly
Open_id_connect_providers.
-
#policy_snippets ⇒ PolicySnippets
readonly
Policy_snippets.
-
#product_apis ⇒ ProductApis
readonly
Product_apis.
-
#product_groups ⇒ ProductGroups
readonly
Product_groups.
-
#product_policy ⇒ ProductPolicy
readonly
Product_policy.
-
#product_subscriptions ⇒ ProductSubscriptions
readonly
Product_subscriptions.
-
#products ⇒ Products
readonly
Products.
-
#properties ⇒ Properties
readonly
Properties.
-
#property ⇒ Property
readonly
Property.
-
#quota_by_counter_keys ⇒ QuotaByCounterKeys
readonly
Quota_by_counter_keys.
-
#quota_by_period_keys ⇒ QuotaByPeriodKeys
readonly
Quota_by_period_keys.
-
#regions ⇒ Regions
readonly
Regions.
-
#reports ⇒ Reports
readonly
Reports.
-
#subscription_id ⇒ String
Microsoft Azure subscription.
-
#subscriptions ⇒ Subscriptions
readonly
Subscriptions.
-
#tenant_access ⇒ TenantAccess
readonly
Tenant_access.
-
#tenant_access_git ⇒ TenantAccessGit
readonly
Tenant_access_git.
-
#tenant_configuration ⇒ TenantConfiguration
readonly
Tenant_configuration.
-
#tenant_configuration_sync_state ⇒ TenantConfigurationSyncState
readonly
Tenant_configuration_sync_state.
-
#tenant_policy ⇒ TenantPolicy
readonly
Tenant_policy.
-
#user_groups ⇒ UserGroups
readonly
User_groups.
-
#user_identities ⇒ UserIdentities
readonly
User_identities.
-
#user_subscriptions ⇒ UserSubscriptions
readonly
User_subscriptions.
-
#users ⇒ Users
readonly
Users.
Instance Method Summary collapse
-
#initialize(credentials = nil, base_url = nil, options = nil) ⇒ ApiManagementClient
constructor
Creates initializes a new instance of the ApiManagementClient class.
-
#make_request(method, path, options = {}) ⇒ Hash{String=>String}
Makes a request and returns the body of the response.
-
#make_request_async(method, path, options = {}) ⇒ Concurrent::Promise
Makes a request asynchronously.
-
#make_request_with_http_info(method, path, options = {}) ⇒ MsRestAzure::AzureOperationResponse
Makes a request and returns the operation response.
Constructor Details
#initialize(credentials = nil, base_url = nil, options = nil) ⇒ ApiManagementClient
Creates initializes a new instance of the ApiManagementClient class.
163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 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 |
# File 'lib/2016-10-10/generated/azure_mgmt_api_management/api_management_client.rb', line 163 def initialize(credentials = nil, base_url = nil, = nil) super(credentials, ) @base_url = base_url || 'https://management.azure.com' fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil? @credentials = credentials @policy_snippets = PolicySnippets.new(self) @regions = Regions.new(self) @apis = Apis.new(self) @api_operations = ApiOperations.new(self) @api_operations_policy = ApiOperationsPolicy.new(self) @api_products = ApiProducts.new(self) @api_policy = ApiPolicy.new(self) @authorization_servers = AuthorizationServers.new(self) @backends = Backends.new(self) @certificates = Certificates.new(self) @api_management_operations = ApiManagementOperations.new(self) @api_management_services = ApiManagementServices.new(self) @groups = Groups.new(self) @group_users = GroupUsers.new(self) @identity_providers = IdentityProviders.new(self) @loggers = Loggers.new(self) @network_status = NetworkStatus.new(self) @open_id_connect_providers = OpenIdConnectProviders.new(self) @products = Products.new(self) @product_apis = ProductApis.new(self) @product_groups = ProductGroups.new(self) @product_subscriptions = ProductSubscriptions.new(self) @product_policy = ProductPolicy.new(self) @properties = Properties.new(self) @property = Property.new(self) @quota_by_counter_keys = QuotaByCounterKeys.new(self) @quota_by_period_keys = QuotaByPeriodKeys.new(self) @reports = Reports.new(self) @subscriptions = Subscriptions.new(self) @tenant_access = TenantAccess.new(self) @tenant_access_git = TenantAccessGit.new(self) @tenant_configuration = TenantConfiguration.new(self) @tenant_configuration_sync_state = TenantConfigurationSyncState.new(self) @tenant_policy = TenantPolicy.new(self) @users = Users.new(self) @user_groups = UserGroups.new(self) @user_subscriptions = UserSubscriptions.new(self) @user_identities = UserIdentities.new(self) @api_export = ApiExport.new(self) @api_version = '2016-10-10' @accept_language = 'en-US' @long_running_operation_retry_timeout = 30 @generate_client_request_id = true add_telemetry end |
Instance Attribute Details
#accept_language ⇒ String
Returns The preferred language for the response.
29 30 31 |
# File 'lib/2016-10-10/generated/azure_mgmt_api_management/api_management_client.rb', line 29 def accept_language @accept_language end |
#api_export ⇒ ApiExport (readonly)
Returns api_export.
155 156 157 |
# File 'lib/2016-10-10/generated/azure_mgmt_api_management/api_management_client.rb', line 155 def api_export @api_export end |
#api_management_operations ⇒ ApiManagementOperations (readonly)
Returns api_management_operations.
71 72 73 |
# File 'lib/2016-10-10/generated/azure_mgmt_api_management/api_management_client.rb', line 71 def api_management_operations @api_management_operations end |
#api_management_services ⇒ ApiManagementServices (readonly)
Returns api_management_services.
74 75 76 |
# File 'lib/2016-10-10/generated/azure_mgmt_api_management/api_management_client.rb', line 74 def api_management_services @api_management_services end |
#api_operations ⇒ ApiOperations (readonly)
Returns api_operations.
50 51 52 |
# File 'lib/2016-10-10/generated/azure_mgmt_api_management/api_management_client.rb', line 50 def api_operations @api_operations end |
#api_operations_policy ⇒ ApiOperationsPolicy (readonly)
Returns api_operations_policy.
53 54 55 |
# File 'lib/2016-10-10/generated/azure_mgmt_api_management/api_management_client.rb', line 53 def api_operations_policy @api_operations_policy end |
#api_policy ⇒ ApiPolicy (readonly)
Returns api_policy.
59 60 61 |
# File 'lib/2016-10-10/generated/azure_mgmt_api_management/api_management_client.rb', line 59 def api_policy @api_policy end |
#api_products ⇒ ApiProducts (readonly)
Returns api_products.
56 57 58 |
# File 'lib/2016-10-10/generated/azure_mgmt_api_management/api_management_client.rb', line 56 def api_products @api_products end |
#api_version ⇒ String (readonly)
Returns Version of the API to be used with the client request.
21 22 23 |
# File 'lib/2016-10-10/generated/azure_mgmt_api_management/api_management_client.rb', line 21 def api_version @api_version end |
#apis ⇒ Apis (readonly)
Returns apis.
47 48 49 |
# File 'lib/2016-10-10/generated/azure_mgmt_api_management/api_management_client.rb', line 47 def apis @apis end |
#authorization_servers ⇒ AuthorizationServers (readonly)
Returns authorization_servers.
62 63 64 |
# File 'lib/2016-10-10/generated/azure_mgmt_api_management/api_management_client.rb', line 62 def @authorization_servers end |
#backends ⇒ Backends (readonly)
Returns backends.
65 66 67 |
# File 'lib/2016-10-10/generated/azure_mgmt_api_management/api_management_client.rb', line 65 def backends @backends end |
#base_url ⇒ String
Returns the base URI of the service.
15 16 17 |
# File 'lib/2016-10-10/generated/azure_mgmt_api_management/api_management_client.rb', line 15 def base_url @base_url end |
#certificates ⇒ Certificates (readonly)
Returns certificates.
68 69 70 |
# File 'lib/2016-10-10/generated/azure_mgmt_api_management/api_management_client.rb', line 68 def certificates @certificates end |
#credentials ⇒ Object (readonly)
Returns Credentials needed for the client to connect to Azure.
18 19 20 |
# File 'lib/2016-10-10/generated/azure_mgmt_api_management/api_management_client.rb', line 18 def credentials @credentials end |
#generate_client_request_id ⇒ Boolean
generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
38 39 40 |
# File 'lib/2016-10-10/generated/azure_mgmt_api_management/api_management_client.rb', line 38 def generate_client_request_id @generate_client_request_id end |
#group_users ⇒ GroupUsers (readonly)
Returns group_users.
80 81 82 |
# File 'lib/2016-10-10/generated/azure_mgmt_api_management/api_management_client.rb', line 80 def group_users @group_users end |
#groups ⇒ Groups (readonly)
Returns groups.
77 78 79 |
# File 'lib/2016-10-10/generated/azure_mgmt_api_management/api_management_client.rb', line 77 def groups @groups end |
#identity_providers ⇒ IdentityProviders (readonly)
Returns identity_providers.
83 84 85 |
# File 'lib/2016-10-10/generated/azure_mgmt_api_management/api_management_client.rb', line 83 def identity_providers @identity_providers end |
#loggers ⇒ Loggers (readonly)
Returns loggers.
86 87 88 |
# File 'lib/2016-10-10/generated/azure_mgmt_api_management/api_management_client.rb', line 86 def loggers @loggers end |
#long_running_operation_retry_timeout ⇒ Integer
Operations. Default value is 30.
33 34 35 |
# File 'lib/2016-10-10/generated/azure_mgmt_api_management/api_management_client.rb', line 33 def long_running_operation_retry_timeout @long_running_operation_retry_timeout end |
#network_status ⇒ NetworkStatus (readonly)
Returns network_status.
89 90 91 |
# File 'lib/2016-10-10/generated/azure_mgmt_api_management/api_management_client.rb', line 89 def network_status @network_status end |
#open_id_connect_providers ⇒ OpenIdConnectProviders (readonly)
Returns open_id_connect_providers.
92 93 94 |
# File 'lib/2016-10-10/generated/azure_mgmt_api_management/api_management_client.rb', line 92 def open_id_connect_providers @open_id_connect_providers end |
#policy_snippets ⇒ PolicySnippets (readonly)
Returns policy_snippets.
41 42 43 |
# File 'lib/2016-10-10/generated/azure_mgmt_api_management/api_management_client.rb', line 41 def policy_snippets @policy_snippets end |
#product_apis ⇒ ProductApis (readonly)
Returns product_apis.
98 99 100 |
# File 'lib/2016-10-10/generated/azure_mgmt_api_management/api_management_client.rb', line 98 def product_apis @product_apis end |
#product_groups ⇒ ProductGroups (readonly)
Returns product_groups.
101 102 103 |
# File 'lib/2016-10-10/generated/azure_mgmt_api_management/api_management_client.rb', line 101 def product_groups @product_groups end |
#product_policy ⇒ ProductPolicy (readonly)
Returns product_policy.
107 108 109 |
# File 'lib/2016-10-10/generated/azure_mgmt_api_management/api_management_client.rb', line 107 def product_policy @product_policy end |
#product_subscriptions ⇒ ProductSubscriptions (readonly)
Returns product_subscriptions.
104 105 106 |
# File 'lib/2016-10-10/generated/azure_mgmt_api_management/api_management_client.rb', line 104 def product_subscriptions @product_subscriptions end |
#products ⇒ Products (readonly)
Returns products.
95 96 97 |
# File 'lib/2016-10-10/generated/azure_mgmt_api_management/api_management_client.rb', line 95 def products @products end |
#properties ⇒ Properties (readonly)
Returns properties.
110 111 112 |
# File 'lib/2016-10-10/generated/azure_mgmt_api_management/api_management_client.rb', line 110 def properties @properties end |
#property ⇒ Property (readonly)
Returns property.
113 114 115 |
# File 'lib/2016-10-10/generated/azure_mgmt_api_management/api_management_client.rb', line 113 def property @property end |
#quota_by_counter_keys ⇒ QuotaByCounterKeys (readonly)
Returns quota_by_counter_keys.
116 117 118 |
# File 'lib/2016-10-10/generated/azure_mgmt_api_management/api_management_client.rb', line 116 def quota_by_counter_keys @quota_by_counter_keys end |
#quota_by_period_keys ⇒ QuotaByPeriodKeys (readonly)
Returns quota_by_period_keys.
119 120 121 |
# File 'lib/2016-10-10/generated/azure_mgmt_api_management/api_management_client.rb', line 119 def quota_by_period_keys @quota_by_period_keys end |
#regions ⇒ Regions (readonly)
Returns regions.
44 45 46 |
# File 'lib/2016-10-10/generated/azure_mgmt_api_management/api_management_client.rb', line 44 def regions @regions end |
#reports ⇒ Reports (readonly)
Returns reports.
122 123 124 |
# File 'lib/2016-10-10/generated/azure_mgmt_api_management/api_management_client.rb', line 122 def reports @reports end |
#subscription_id ⇒ String
Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
26 27 28 |
# File 'lib/2016-10-10/generated/azure_mgmt_api_management/api_management_client.rb', line 26 def subscription_id @subscription_id end |
#subscriptions ⇒ Subscriptions (readonly)
Returns subscriptions.
125 126 127 |
# File 'lib/2016-10-10/generated/azure_mgmt_api_management/api_management_client.rb', line 125 def subscriptions @subscriptions end |
#tenant_access ⇒ TenantAccess (readonly)
Returns tenant_access.
128 129 130 |
# File 'lib/2016-10-10/generated/azure_mgmt_api_management/api_management_client.rb', line 128 def tenant_access @tenant_access end |
#tenant_access_git ⇒ TenantAccessGit (readonly)
Returns tenant_access_git.
131 132 133 |
# File 'lib/2016-10-10/generated/azure_mgmt_api_management/api_management_client.rb', line 131 def tenant_access_git @tenant_access_git end |
#tenant_configuration ⇒ TenantConfiguration (readonly)
Returns tenant_configuration.
134 135 136 |
# File 'lib/2016-10-10/generated/azure_mgmt_api_management/api_management_client.rb', line 134 def tenant_configuration @tenant_configuration end |
#tenant_configuration_sync_state ⇒ TenantConfigurationSyncState (readonly)
Returns tenant_configuration_sync_state.
137 138 139 |
# File 'lib/2016-10-10/generated/azure_mgmt_api_management/api_management_client.rb', line 137 def tenant_configuration_sync_state @tenant_configuration_sync_state end |
#tenant_policy ⇒ TenantPolicy (readonly)
Returns tenant_policy.
140 141 142 |
# File 'lib/2016-10-10/generated/azure_mgmt_api_management/api_management_client.rb', line 140 def tenant_policy @tenant_policy end |
#user_groups ⇒ UserGroups (readonly)
Returns user_groups.
146 147 148 |
# File 'lib/2016-10-10/generated/azure_mgmt_api_management/api_management_client.rb', line 146 def user_groups @user_groups end |
#user_identities ⇒ UserIdentities (readonly)
Returns user_identities.
152 153 154 |
# File 'lib/2016-10-10/generated/azure_mgmt_api_management/api_management_client.rb', line 152 def user_identities @user_identities end |
#user_subscriptions ⇒ UserSubscriptions (readonly)
Returns user_subscriptions.
149 150 151 |
# File 'lib/2016-10-10/generated/azure_mgmt_api_management/api_management_client.rb', line 149 def user_subscriptions @user_subscriptions end |
#users ⇒ Users (readonly)
Returns users.
143 144 145 |
# File 'lib/2016-10-10/generated/azure_mgmt_api_management/api_management_client.rb', line 143 def users @users end |
Instance Method Details
#make_request(method, path, options = {}) ⇒ Hash{String=>String}
Makes a request and returns the body of the response. Example:
request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}"
path = "/path"
= {
body: request_content,
query_params: {'api-version' => '2016-02-01'}
}
result = @client.make_request(:put, path, )
232 233 234 235 |
# File 'lib/2016-10-10/generated/azure_mgmt_api_management/api_management_client.rb', line 232 def make_request(method, path, = {}) result = make_request_with_http_info(method, path, ) result.body unless result.nil? end |
#make_request_async(method, path, options = {}) ⇒ Concurrent::Promise
Makes a request asynchronously.
257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 |
# File 'lib/2016-10-10/generated/azure_mgmt_api_management/api_management_client.rb', line 257 def make_request_async(method, path, = {}) fail ArgumentError, 'method is nil' if method.nil? fail ArgumentError, 'path is nil' if path.nil? request_url = [:base_url] || @base_url if(![:headers].nil? && ![:headers]['Content-Type'].nil?) @request_headers['Content-Type'] = [:headers]['Content-Type'] end request_headers = @request_headers request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil? .merge!({headers: request_headers.merge([:headers] || {})}) .merge!({credentials: @credentials}) unless @credentials.nil? super(request_url, method, path, ) end |
#make_request_with_http_info(method, path, options = {}) ⇒ MsRestAzure::AzureOperationResponse
Makes a request and returns the operation response.
244 245 246 247 248 |
# File 'lib/2016-10-10/generated/azure_mgmt_api_management/api_management_client.rb', line 244 def make_request_with_http_info(method, path, = {}) result = make_request_async(method, path, ).value! result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body) result end |