Class: Azure::ApiManagement::Mgmt::V2016_07_07::ApiManagementClient
- Inherits:
-
MsRestAzure::AzureServiceClient
- Object
- MsRestAzure::AzureServiceClient
- Azure::ApiManagement::Mgmt::V2016_07_07::ApiManagementClient
- Includes:
- MsRestAzure, MsRestAzure::Serialization
- Defined in:
- lib/2016-07-07/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_management_services ⇒ ApiManagementServices
readonly
Api_management_services.
-
#api_operations ⇒ ApiOperations
readonly
Api_operations.
-
#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.
-
#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_subscriptions ⇒ ProductSubscriptions
readonly
Product_subscriptions.
-
#products ⇒ Products
readonly
Products.
-
#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.
-
#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.
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 |
# File 'lib/2016-07-07/generated/azure_mgmt_api_management/api_management_client.rb', line 139 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 @apis = Apis.new(self) @api_operations = ApiOperations.new(self) @api_products = ApiProducts.new(self) @subscriptions = Subscriptions.new(self) @products = Products.new(self) @product_apis = ProductApis.new(self) @product_groups = ProductGroups.new(self) @groups = Groups.new(self) @group_users = GroupUsers.new(self) @certificates = Certificates.new(self) @policy_snippets = PolicySnippets.new(self) @product_subscriptions = ProductSubscriptions.new(self) @users = Users.new(self) @user_groups = UserGroups.new(self) @user_subscriptions = UserSubscriptions.new(self) @authorization_servers = AuthorizationServers.new(self) @regions = Regions.new(self) @user_identities = UserIdentities.new(self) @reports = Reports.new(self) @tenant_access = TenantAccess.new(self) @loggers = Loggers.new(self) @property = Property.new(self) @open_id_connect_providers = OpenIdConnectProviders.new(self) @tenant_access_git = TenantAccessGit.new(self) @tenant_configuration = TenantConfiguration.new(self) @tenant_configuration_sync_state = TenantConfigurationSyncState.new(self) @backends = Backends.new(self) @identity_providers = IdentityProviders.new(self) @quota_by_counter_keys = QuotaByCounterKeys.new(self) @quota_by_period_keys = QuotaByPeriodKeys.new(self) @api_management_services = ApiManagementServices.new(self) @api_version = '2016-07-07' @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-07-07/generated/azure_mgmt_api_management/api_management_client.rb', line 29 def accept_language @accept_language end |
#api_management_services ⇒ ApiManagementServices (readonly)
Returns api_management_services.
131 132 133 |
# File 'lib/2016-07-07/generated/azure_mgmt_api_management/api_management_client.rb', line 131 def api_management_services @api_management_services end |
#api_operations ⇒ ApiOperations (readonly)
Returns api_operations.
44 45 46 |
# File 'lib/2016-07-07/generated/azure_mgmt_api_management/api_management_client.rb', line 44 def api_operations @api_operations end |
#api_products ⇒ ApiProducts (readonly)
Returns api_products.
47 48 49 |
# File 'lib/2016-07-07/generated/azure_mgmt_api_management/api_management_client.rb', line 47 def api_products @api_products end |
#api_version ⇒ String (readonly)
Returns Version of the API to be used with the client request.
26 27 28 |
# File 'lib/2016-07-07/generated/azure_mgmt_api_management/api_management_client.rb', line 26 def api_version @api_version end |
#apis ⇒ Apis (readonly)
Returns apis.
41 42 43 |
# File 'lib/2016-07-07/generated/azure_mgmt_api_management/api_management_client.rb', line 41 def apis @apis end |
#authorization_servers ⇒ AuthorizationServers (readonly)
Returns authorization_servers.
86 87 88 |
# File 'lib/2016-07-07/generated/azure_mgmt_api_management/api_management_client.rb', line 86 def @authorization_servers end |
#backends ⇒ Backends (readonly)
Returns backends.
119 120 121 |
# File 'lib/2016-07-07/generated/azure_mgmt_api_management/api_management_client.rb', line 119 def backends @backends end |
#base_url ⇒ String
Returns the base URI of the service.
15 16 17 |
# File 'lib/2016-07-07/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-07-07/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-07-07/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-07-07/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.
65 66 67 |
# File 'lib/2016-07-07/generated/azure_mgmt_api_management/api_management_client.rb', line 65 def group_users @group_users end |
#groups ⇒ Groups (readonly)
Returns groups.
62 63 64 |
# File 'lib/2016-07-07/generated/azure_mgmt_api_management/api_management_client.rb', line 62 def groups @groups end |
#identity_providers ⇒ IdentityProviders (readonly)
Returns identity_providers.
122 123 124 |
# File 'lib/2016-07-07/generated/azure_mgmt_api_management/api_management_client.rb', line 122 def identity_providers @identity_providers end |
#loggers ⇒ Loggers (readonly)
Returns loggers.
101 102 103 |
# File 'lib/2016-07-07/generated/azure_mgmt_api_management/api_management_client.rb', line 101 def loggers @loggers end |
#long_running_operation_retry_timeout ⇒ Integer
Operations. Default value is 30.
33 34 35 |
# File 'lib/2016-07-07/generated/azure_mgmt_api_management/api_management_client.rb', line 33 def long_running_operation_retry_timeout @long_running_operation_retry_timeout end |
#open_id_connect_providers ⇒ OpenIdConnectProviders (readonly)
Returns open_id_connect_providers.
107 108 109 |
# File 'lib/2016-07-07/generated/azure_mgmt_api_management/api_management_client.rb', line 107 def open_id_connect_providers @open_id_connect_providers end |
#policy_snippets ⇒ PolicySnippets (readonly)
Returns policy_snippets.
71 72 73 |
# File 'lib/2016-07-07/generated/azure_mgmt_api_management/api_management_client.rb', line 71 def policy_snippets @policy_snippets end |
#product_apis ⇒ ProductApis (readonly)
Returns product_apis.
56 57 58 |
# File 'lib/2016-07-07/generated/azure_mgmt_api_management/api_management_client.rb', line 56 def product_apis @product_apis end |
#product_groups ⇒ ProductGroups (readonly)
Returns product_groups.
59 60 61 |
# File 'lib/2016-07-07/generated/azure_mgmt_api_management/api_management_client.rb', line 59 def product_groups @product_groups end |
#product_subscriptions ⇒ ProductSubscriptions (readonly)
Returns product_subscriptions.
74 75 76 |
# File 'lib/2016-07-07/generated/azure_mgmt_api_management/api_management_client.rb', line 74 def product_subscriptions @product_subscriptions end |
#products ⇒ Products (readonly)
Returns products.
53 54 55 |
# File 'lib/2016-07-07/generated/azure_mgmt_api_management/api_management_client.rb', line 53 def products @products end |
#property ⇒ Property (readonly)
Returns property.
104 105 106 |
# File 'lib/2016-07-07/generated/azure_mgmt_api_management/api_management_client.rb', line 104 def property @property end |
#quota_by_counter_keys ⇒ QuotaByCounterKeys (readonly)
Returns quota_by_counter_keys.
125 126 127 |
# File 'lib/2016-07-07/generated/azure_mgmt_api_management/api_management_client.rb', line 125 def quota_by_counter_keys @quota_by_counter_keys end |
#quota_by_period_keys ⇒ QuotaByPeriodKeys (readonly)
Returns quota_by_period_keys.
128 129 130 |
# File 'lib/2016-07-07/generated/azure_mgmt_api_management/api_management_client.rb', line 128 def quota_by_period_keys @quota_by_period_keys end |
#regions ⇒ Regions (readonly)
Returns regions.
89 90 91 |
# File 'lib/2016-07-07/generated/azure_mgmt_api_management/api_management_client.rb', line 89 def regions @regions end |
#reports ⇒ Reports (readonly)
Returns reports.
95 96 97 |
# File 'lib/2016-07-07/generated/azure_mgmt_api_management/api_management_client.rb', line 95 def reports @reports end |
#subscription_id ⇒ String
Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
23 24 25 |
# File 'lib/2016-07-07/generated/azure_mgmt_api_management/api_management_client.rb', line 23 def subscription_id @subscription_id end |
#subscriptions ⇒ Subscriptions (readonly)
Returns subscriptions.
50 51 52 |
# File 'lib/2016-07-07/generated/azure_mgmt_api_management/api_management_client.rb', line 50 def subscriptions @subscriptions end |
#tenant_access ⇒ TenantAccess (readonly)
Returns tenant_access.
98 99 100 |
# File 'lib/2016-07-07/generated/azure_mgmt_api_management/api_management_client.rb', line 98 def tenant_access @tenant_access end |
#tenant_access_git ⇒ TenantAccessGit (readonly)
Returns tenant_access_git.
110 111 112 |
# File 'lib/2016-07-07/generated/azure_mgmt_api_management/api_management_client.rb', line 110 def tenant_access_git @tenant_access_git end |
#tenant_configuration ⇒ TenantConfiguration (readonly)
Returns tenant_configuration.
113 114 115 |
# File 'lib/2016-07-07/generated/azure_mgmt_api_management/api_management_client.rb', line 113 def tenant_configuration @tenant_configuration end |
#tenant_configuration_sync_state ⇒ TenantConfigurationSyncState (readonly)
Returns tenant_configuration_sync_state.
116 117 118 |
# File 'lib/2016-07-07/generated/azure_mgmt_api_management/api_management_client.rb', line 116 def tenant_configuration_sync_state @tenant_configuration_sync_state end |
#user_groups ⇒ UserGroups (readonly)
Returns user_groups.
80 81 82 |
# File 'lib/2016-07-07/generated/azure_mgmt_api_management/api_management_client.rb', line 80 def user_groups @user_groups end |
#user_identities ⇒ UserIdentities (readonly)
Returns user_identities.
92 93 94 |
# File 'lib/2016-07-07/generated/azure_mgmt_api_management/api_management_client.rb', line 92 def user_identities @user_identities end |
#user_subscriptions ⇒ UserSubscriptions (readonly)
Returns user_subscriptions.
83 84 85 |
# File 'lib/2016-07-07/generated/azure_mgmt_api_management/api_management_client.rb', line 83 def user_subscriptions @user_subscriptions end |
#users ⇒ Users (readonly)
Returns users.
77 78 79 |
# File 'lib/2016-07-07/generated/azure_mgmt_api_management/api_management_client.rb', line 77 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, )
200 201 202 203 |
# File 'lib/2016-07-07/generated/azure_mgmt_api_management/api_management_client.rb', line 200 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.
225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 |
# File 'lib/2016-07-07/generated/azure_mgmt_api_management/api_management_client.rb', line 225 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.
212 213 214 215 216 |
# File 'lib/2016-07-07/generated/azure_mgmt_api_management/api_management_client.rb', line 212 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 |