Class: Azure::Automation::Mgmt::V2015_10_31::AutomationClient
- Inherits:
-
MsRestAzure::AzureServiceClient
- Object
- MsRestAzure::AzureServiceClient
- Azure::Automation::Mgmt::V2015_10_31::AutomationClient
- Includes:
- MsRestAzure, MsRestAzure::Serialization
- Defined in:
- lib/2015-10-31/generated/azure_mgmt_automation/automation_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.
-
#activity_operations ⇒ ActivityOperations
readonly
Activity_operations.
-
#agent_registration_information ⇒ AgentRegistrationInformation
readonly
Agent_registration_information.
-
#api_version ⇒ String
readonly
Client Api Version.
-
#automation_account_operations ⇒ AutomationAccountOperations
readonly
Automation_account_operations.
-
#base_url ⇒ String
The base URI of the service.
-
#certificate_operations ⇒ CertificateOperations
readonly
Certificate_operations.
-
#connection_operations ⇒ ConnectionOperations
readonly
Connection_operations.
-
#connection_type_operations ⇒ ConnectionTypeOperations
readonly
Connection_type_operations.
-
#credential_operations ⇒ CredentialOperations
readonly
Credential_operations.
-
#credentials ⇒ Object
readonly
Credentials needed for the client to connect to Azure.
-
#dsc_compilation_job_operations ⇒ DscCompilationJobOperations
readonly
Dsc_compilation_job_operations.
-
#dsc_compilation_job_stream ⇒ DscCompilationJobStream
readonly
Dsc_compilation_job_stream.
-
#dsc_configuration_operations ⇒ DscConfigurationOperations
readonly
Dsc_configuration_operations.
-
#dsc_node_configuration_operations ⇒ DscNodeConfigurationOperations
readonly
dsc_node_configuration_operations.
-
#dsc_node_operations ⇒ DscNodeOperations
readonly
Dsc_node_operations.
-
#fields ⇒ Fields
readonly
Fields.
-
#generate_client_request_id ⇒ Boolean
generated.
-
#hybrid_runbook_worker_group_operations ⇒ HybridRunbookWorkerGroupOperations
readonly
hybrid_runbook_worker_group_operations.
-
#job_operations ⇒ JobOperations
readonly
Job_operations.
-
#job_schedule_operations ⇒ JobScheduleOperations
readonly
Job_schedule_operations.
-
#job_stream_operations ⇒ JobStreamOperations
readonly
Job_stream_operations.
-
#keys ⇒ Keys
readonly
Keys.
-
#linked_workspace_operations ⇒ LinkedWorkspaceOperations
readonly
Linked_workspace_operations.
-
#long_running_operation_retry_timeout ⇒ Integer
Operations.
-
#module_model_operations ⇒ ModuleModelOperations
readonly
Module_model_operations.
-
#node_reports ⇒ NodeReports
readonly
Node_reports.
-
#object_data_types ⇒ ObjectDataTypes
readonly
Object_data_types.
-
#operations ⇒ Operations
readonly
Operations.
-
#runbook_draft_operations ⇒ RunbookDraftOperations
readonly
Runbook_draft_operations.
-
#runbook_operations ⇒ RunbookOperations
readonly
Runbook_operations.
-
#schedule_operations ⇒ ScheduleOperations
readonly
Schedule_operations.
-
#statistics_operations ⇒ StatisticsOperations
readonly
Statistics_operations.
-
#subscription_id ⇒ String
Microsoft Azure subscription.
-
#test_job_operations ⇒ TestJobOperations
readonly
Test_job_operations.
-
#test_job_streams ⇒ TestJobStreams
readonly
Test_job_streams.
-
#usages ⇒ Usages
readonly
Usages.
-
#variable_operations ⇒ VariableOperations
readonly
Variable_operations.
-
#webhook_operations ⇒ WebhookOperations
readonly
Webhook_operations.
Instance Method Summary collapse
-
#initialize(credentials = nil, base_url = nil, options = nil) ⇒ AutomationClient
constructor
Creates initializes a new instance of the AutomationClient 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) ⇒ AutomationClient
Creates initializes a new instance of the AutomationClient class.
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 183 184 185 186 187 188 |
# File 'lib/2015-10-31/generated/azure_mgmt_automation/automation_client.rb', line 144 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 @automation_account_operations = AutomationAccountOperations.new(self) @operations = Operations.new(self) @statistics_operations = StatisticsOperations.new(self) @usages = Usages.new(self) @keys = Keys.new(self) @certificate_operations = CertificateOperations.new(self) @connection_operations = ConnectionOperations.new(self) @connection_type_operations = ConnectionTypeOperations.new(self) @credential_operations = CredentialOperations.new(self) @dsc_compilation_job_operations = DscCompilationJobOperations.new(self) @dsc_compilation_job_stream = DscCompilationJobStream.new(self) @dsc_configuration_operations = DscConfigurationOperations.new(self) @agent_registration_information = AgentRegistrationInformation.new(self) @dsc_node_operations = DscNodeOperations.new(self) @node_reports = NodeReports.new(self) @dsc_node_configuration_operations = DscNodeConfigurationOperations.new(self) @hybrid_runbook_worker_group_operations = HybridRunbookWorkerGroupOperations.new(self) @job_operations = JobOperations.new(self) @job_stream_operations = JobStreamOperations.new(self) @job_schedule_operations = JobScheduleOperations.new(self) @linked_workspace_operations = LinkedWorkspaceOperations.new(self) @activity_operations = ActivityOperations.new(self) @module_model_operations = ModuleModelOperations.new(self) @object_data_types = ObjectDataTypes.new(self) @fields = Fields.new(self) @runbook_draft_operations = RunbookDraftOperations.new(self) @runbook_operations = RunbookOperations.new(self) @test_job_streams = TestJobStreams.new(self) @test_job_operations = TestJobOperations.new(self) @schedule_operations = ScheduleOperations.new(self) @variable_operations = VariableOperations.new(self) @webhook_operations = WebhookOperations.new(self) @api_version = '2015-10-31' @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/2015-10-31/generated/azure_mgmt_automation/automation_client.rb', line 29 def accept_language @accept_language end |
#activity_operations ⇒ ActivityOperations (readonly)
Returns activity_operations.
106 107 108 |
# File 'lib/2015-10-31/generated/azure_mgmt_automation/automation_client.rb', line 106 def activity_operations @activity_operations end |
#agent_registration_information ⇒ AgentRegistrationInformation (readonly)
Returns agent_registration_information.
77 78 79 |
# File 'lib/2015-10-31/generated/azure_mgmt_automation/automation_client.rb', line 77 def agent_registration_information @agent_registration_information end |
#api_version ⇒ String (readonly)
Returns Client Api Version.
21 22 23 |
# File 'lib/2015-10-31/generated/azure_mgmt_automation/automation_client.rb', line 21 def api_version @api_version end |
#automation_account_operations ⇒ AutomationAccountOperations (readonly)
Returns automation_account_operations.
41 42 43 |
# File 'lib/2015-10-31/generated/azure_mgmt_automation/automation_client.rb', line 41 def automation_account_operations @automation_account_operations end |
#base_url ⇒ String
Returns the base URI of the service.
15 16 17 |
# File 'lib/2015-10-31/generated/azure_mgmt_automation/automation_client.rb', line 15 def base_url @base_url end |
#certificate_operations ⇒ CertificateOperations (readonly)
Returns certificate_operations.
56 57 58 |
# File 'lib/2015-10-31/generated/azure_mgmt_automation/automation_client.rb', line 56 def certificate_operations @certificate_operations end |
#connection_operations ⇒ ConnectionOperations (readonly)
Returns connection_operations.
59 60 61 |
# File 'lib/2015-10-31/generated/azure_mgmt_automation/automation_client.rb', line 59 def connection_operations @connection_operations end |
#connection_type_operations ⇒ ConnectionTypeOperations (readonly)
Returns connection_type_operations.
62 63 64 |
# File 'lib/2015-10-31/generated/azure_mgmt_automation/automation_client.rb', line 62 def connection_type_operations @connection_type_operations end |
#credential_operations ⇒ CredentialOperations (readonly)
Returns credential_operations.
65 66 67 |
# File 'lib/2015-10-31/generated/azure_mgmt_automation/automation_client.rb', line 65 def credential_operations @credential_operations end |
#credentials ⇒ Object (readonly)
Returns Credentials needed for the client to connect to Azure.
18 19 20 |
# File 'lib/2015-10-31/generated/azure_mgmt_automation/automation_client.rb', line 18 def credentials @credentials end |
#dsc_compilation_job_operations ⇒ DscCompilationJobOperations (readonly)
Returns dsc_compilation_job_operations.
68 69 70 |
# File 'lib/2015-10-31/generated/azure_mgmt_automation/automation_client.rb', line 68 def dsc_compilation_job_operations @dsc_compilation_job_operations end |
#dsc_compilation_job_stream ⇒ DscCompilationJobStream (readonly)
Returns dsc_compilation_job_stream.
71 72 73 |
# File 'lib/2015-10-31/generated/azure_mgmt_automation/automation_client.rb', line 71 def dsc_compilation_job_stream @dsc_compilation_job_stream end |
#dsc_configuration_operations ⇒ DscConfigurationOperations (readonly)
Returns dsc_configuration_operations.
74 75 76 |
# File 'lib/2015-10-31/generated/azure_mgmt_automation/automation_client.rb', line 74 def dsc_configuration_operations @dsc_configuration_operations end |
#dsc_node_configuration_operations ⇒ DscNodeConfigurationOperations (readonly)
dsc_node_configuration_operations
87 88 89 |
# File 'lib/2015-10-31/generated/azure_mgmt_automation/automation_client.rb', line 87 def dsc_node_configuration_operations @dsc_node_configuration_operations end |
#dsc_node_operations ⇒ DscNodeOperations (readonly)
Returns dsc_node_operations.
80 81 82 |
# File 'lib/2015-10-31/generated/azure_mgmt_automation/automation_client.rb', line 80 def dsc_node_operations @dsc_node_operations end |
#fields ⇒ Fields (readonly)
Returns fields.
115 116 117 |
# File 'lib/2015-10-31/generated/azure_mgmt_automation/automation_client.rb', line 115 def fields @fields 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/2015-10-31/generated/azure_mgmt_automation/automation_client.rb', line 38 def generate_client_request_id @generate_client_request_id end |
#hybrid_runbook_worker_group_operations ⇒ HybridRunbookWorkerGroupOperations (readonly)
hybrid_runbook_worker_group_operations
91 92 93 |
# File 'lib/2015-10-31/generated/azure_mgmt_automation/automation_client.rb', line 91 def hybrid_runbook_worker_group_operations @hybrid_runbook_worker_group_operations end |
#job_operations ⇒ JobOperations (readonly)
Returns job_operations.
94 95 96 |
# File 'lib/2015-10-31/generated/azure_mgmt_automation/automation_client.rb', line 94 def job_operations @job_operations end |
#job_schedule_operations ⇒ JobScheduleOperations (readonly)
Returns job_schedule_operations.
100 101 102 |
# File 'lib/2015-10-31/generated/azure_mgmt_automation/automation_client.rb', line 100 def job_schedule_operations @job_schedule_operations end |
#job_stream_operations ⇒ JobStreamOperations (readonly)
Returns job_stream_operations.
97 98 99 |
# File 'lib/2015-10-31/generated/azure_mgmt_automation/automation_client.rb', line 97 def job_stream_operations @job_stream_operations end |
#keys ⇒ Keys (readonly)
Returns keys.
53 54 55 |
# File 'lib/2015-10-31/generated/azure_mgmt_automation/automation_client.rb', line 53 def keys @keys end |
#linked_workspace_operations ⇒ LinkedWorkspaceOperations (readonly)
Returns linked_workspace_operations.
103 104 105 |
# File 'lib/2015-10-31/generated/azure_mgmt_automation/automation_client.rb', line 103 def linked_workspace_operations @linked_workspace_operations end |
#long_running_operation_retry_timeout ⇒ Integer
Operations. Default value is 30.
33 34 35 |
# File 'lib/2015-10-31/generated/azure_mgmt_automation/automation_client.rb', line 33 def long_running_operation_retry_timeout @long_running_operation_retry_timeout end |
#module_model_operations ⇒ ModuleModelOperations (readonly)
Returns module_model_operations.
109 110 111 |
# File 'lib/2015-10-31/generated/azure_mgmt_automation/automation_client.rb', line 109 def module_model_operations @module_model_operations end |
#node_reports ⇒ NodeReports (readonly)
Returns node_reports.
83 84 85 |
# File 'lib/2015-10-31/generated/azure_mgmt_automation/automation_client.rb', line 83 def node_reports @node_reports end |
#object_data_types ⇒ ObjectDataTypes (readonly)
Returns object_data_types.
112 113 114 |
# File 'lib/2015-10-31/generated/azure_mgmt_automation/automation_client.rb', line 112 def object_data_types @object_data_types end |
#operations ⇒ Operations (readonly)
Returns operations.
44 45 46 |
# File 'lib/2015-10-31/generated/azure_mgmt_automation/automation_client.rb', line 44 def operations @operations end |
#runbook_draft_operations ⇒ RunbookDraftOperations (readonly)
Returns runbook_draft_operations.
118 119 120 |
# File 'lib/2015-10-31/generated/azure_mgmt_automation/automation_client.rb', line 118 def runbook_draft_operations @runbook_draft_operations end |
#runbook_operations ⇒ RunbookOperations (readonly)
Returns runbook_operations.
121 122 123 |
# File 'lib/2015-10-31/generated/azure_mgmt_automation/automation_client.rb', line 121 def runbook_operations @runbook_operations end |
#schedule_operations ⇒ ScheduleOperations (readonly)
Returns schedule_operations.
130 131 132 |
# File 'lib/2015-10-31/generated/azure_mgmt_automation/automation_client.rb', line 130 def schedule_operations @schedule_operations end |
#statistics_operations ⇒ StatisticsOperations (readonly)
Returns statistics_operations.
47 48 49 |
# File 'lib/2015-10-31/generated/azure_mgmt_automation/automation_client.rb', line 47 def statistics_operations @statistics_operations end |
#subscription_id ⇒ String
Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
26 27 28 |
# File 'lib/2015-10-31/generated/azure_mgmt_automation/automation_client.rb', line 26 def subscription_id @subscription_id end |
#test_job_operations ⇒ TestJobOperations (readonly)
Returns test_job_operations.
127 128 129 |
# File 'lib/2015-10-31/generated/azure_mgmt_automation/automation_client.rb', line 127 def test_job_operations @test_job_operations end |
#test_job_streams ⇒ TestJobStreams (readonly)
Returns test_job_streams.
124 125 126 |
# File 'lib/2015-10-31/generated/azure_mgmt_automation/automation_client.rb', line 124 def test_job_streams @test_job_streams end |
#usages ⇒ Usages (readonly)
Returns usages.
50 51 52 |
# File 'lib/2015-10-31/generated/azure_mgmt_automation/automation_client.rb', line 50 def usages @usages end |
#variable_operations ⇒ VariableOperations (readonly)
Returns variable_operations.
133 134 135 |
# File 'lib/2015-10-31/generated/azure_mgmt_automation/automation_client.rb', line 133 def variable_operations @variable_operations end |
#webhook_operations ⇒ WebhookOperations (readonly)
Returns webhook_operations.
136 137 138 |
# File 'lib/2015-10-31/generated/azure_mgmt_automation/automation_client.rb', line 136 def webhook_operations @webhook_operations 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, )
206 207 208 209 |
# File 'lib/2015-10-31/generated/azure_mgmt_automation/automation_client.rb', line 206 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.
231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 |
# File 'lib/2015-10-31/generated/azure_mgmt_automation/automation_client.rb', line 231 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.
218 219 220 221 222 |
# File 'lib/2015-10-31/generated/azure_mgmt_automation/automation_client.rb', line 218 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 |