aws-sdk-codegurusecurity 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,1060 @@
1
+ # frozen_string_literal: true
2
+
3
+ # WARNING ABOUT GENERATED CODE
4
+ #
5
+ # This file is generated. See the contributing guide for more information:
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
+ #
8
+ # WARNING ABOUT GENERATED CODE
9
+
10
+ require 'seahorse/client/plugins/content_length.rb'
11
+ require 'aws-sdk-core/plugins/credentials_configuration.rb'
12
+ require 'aws-sdk-core/plugins/logging.rb'
13
+ require 'aws-sdk-core/plugins/param_converter.rb'
14
+ require 'aws-sdk-core/plugins/param_validator.rb'
15
+ require 'aws-sdk-core/plugins/user_agent.rb'
16
+ require 'aws-sdk-core/plugins/helpful_socket_errors.rb'
17
+ require 'aws-sdk-core/plugins/retry_errors.rb'
18
+ require 'aws-sdk-core/plugins/global_configuration.rb'
19
+ require 'aws-sdk-core/plugins/regional_endpoint.rb'
20
+ require 'aws-sdk-core/plugins/endpoint_discovery.rb'
21
+ require 'aws-sdk-core/plugins/endpoint_pattern.rb'
22
+ require 'aws-sdk-core/plugins/response_paging.rb'
23
+ require 'aws-sdk-core/plugins/stub_responses.rb'
24
+ require 'aws-sdk-core/plugins/idempotency_token.rb'
25
+ require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
26
+ require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
27
+ require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
28
+ require 'aws-sdk-core/plugins/transfer_encoding.rb'
29
+ require 'aws-sdk-core/plugins/http_checksum.rb'
30
+ require 'aws-sdk-core/plugins/checksum_algorithm.rb'
31
+ require 'aws-sdk-core/plugins/defaults_mode.rb'
32
+ require 'aws-sdk-core/plugins/recursion_detection.rb'
33
+ require 'aws-sdk-core/plugins/sign.rb'
34
+ require 'aws-sdk-core/plugins/protocols/rest_json.rb'
35
+
36
+ Aws::Plugins::GlobalConfiguration.add_identifier(:codegurusecurity)
37
+
38
+ module Aws::CodeGuruSecurity
39
+ # An API client for CodeGuruSecurity. To construct a client, you need to configure a `:region` and `:credentials`.
40
+ #
41
+ # client = Aws::CodeGuruSecurity::Client.new(
42
+ # region: region_name,
43
+ # credentials: credentials,
44
+ # # ...
45
+ # )
46
+ #
47
+ # For details on configuring region and credentials see
48
+ # the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
49
+ #
50
+ # See {#initialize} for a full list of supported configuration options.
51
+ class Client < Seahorse::Client::Base
52
+
53
+ include Aws::ClientStubs
54
+
55
+ @identifier = :codegurusecurity
56
+
57
+ set_api(ClientApi::API)
58
+
59
+ add_plugin(Seahorse::Client::Plugins::ContentLength)
60
+ add_plugin(Aws::Plugins::CredentialsConfiguration)
61
+ add_plugin(Aws::Plugins::Logging)
62
+ add_plugin(Aws::Plugins::ParamConverter)
63
+ add_plugin(Aws::Plugins::ParamValidator)
64
+ add_plugin(Aws::Plugins::UserAgent)
65
+ add_plugin(Aws::Plugins::HelpfulSocketErrors)
66
+ add_plugin(Aws::Plugins::RetryErrors)
67
+ add_plugin(Aws::Plugins::GlobalConfiguration)
68
+ add_plugin(Aws::Plugins::RegionalEndpoint)
69
+ add_plugin(Aws::Plugins::EndpointDiscovery)
70
+ add_plugin(Aws::Plugins::EndpointPattern)
71
+ add_plugin(Aws::Plugins::ResponsePaging)
72
+ add_plugin(Aws::Plugins::StubResponses)
73
+ add_plugin(Aws::Plugins::IdempotencyToken)
74
+ add_plugin(Aws::Plugins::JsonvalueConverter)
75
+ add_plugin(Aws::Plugins::ClientMetricsPlugin)
76
+ add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
77
+ add_plugin(Aws::Plugins::TransferEncoding)
78
+ add_plugin(Aws::Plugins::HttpChecksum)
79
+ add_plugin(Aws::Plugins::ChecksumAlgorithm)
80
+ add_plugin(Aws::Plugins::DefaultsMode)
81
+ add_plugin(Aws::Plugins::RecursionDetection)
82
+ add_plugin(Aws::Plugins::Sign)
83
+ add_plugin(Aws::Plugins::Protocols::RestJson)
84
+ add_plugin(Aws::CodeGuruSecurity::Plugins::Endpoints)
85
+
86
+ # @overload initialize(options)
87
+ # @param [Hash] options
88
+ # @option options [required, Aws::CredentialProvider] :credentials
89
+ # Your AWS credentials. This can be an instance of any one of the
90
+ # following classes:
91
+ #
92
+ # * `Aws::Credentials` - Used for configuring static, non-refreshing
93
+ # credentials.
94
+ #
95
+ # * `Aws::SharedCredentials` - Used for loading static credentials from a
96
+ # shared file, such as `~/.aws/config`.
97
+ #
98
+ # * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
99
+ #
100
+ # * `Aws::AssumeRoleWebIdentityCredentials` - Used when you need to
101
+ # assume a role after providing credentials via the web.
102
+ #
103
+ # * `Aws::SSOCredentials` - Used for loading credentials from AWS SSO using an
104
+ # access token generated from `aws login`.
105
+ #
106
+ # * `Aws::ProcessCredentials` - Used for loading credentials from a
107
+ # process that outputs to stdout.
108
+ #
109
+ # * `Aws::InstanceProfileCredentials` - Used for loading credentials
110
+ # from an EC2 IMDS on an EC2 instance.
111
+ #
112
+ # * `Aws::ECSCredentials` - Used for loading credentials from
113
+ # instances running in ECS.
114
+ #
115
+ # * `Aws::CognitoIdentityCredentials` - Used for loading credentials
116
+ # from the Cognito Identity service.
117
+ #
118
+ # When `:credentials` are not configured directly, the following
119
+ # locations will be searched for credentials:
120
+ #
121
+ # * `Aws.config[:credentials]`
122
+ # * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
123
+ # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
124
+ # * `~/.aws/credentials`
125
+ # * `~/.aws/config`
126
+ # * EC2/ECS IMDS instance profile - When used by default, the timeouts
127
+ # are very aggressive. Construct and pass an instance of
128
+ # `Aws::InstanceProfileCredentails` or `Aws::ECSCredentials` to
129
+ # enable retries and extended timeouts. Instance profile credential
130
+ # fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED']
131
+ # to true.
132
+ #
133
+ # @option options [required, String] :region
134
+ # The AWS region to connect to. The configured `:region` is
135
+ # used to determine the service `:endpoint`. When not passed,
136
+ # a default `:region` is searched for in the following locations:
137
+ #
138
+ # * `Aws.config[:region]`
139
+ # * `ENV['AWS_REGION']`
140
+ # * `ENV['AMAZON_REGION']`
141
+ # * `ENV['AWS_DEFAULT_REGION']`
142
+ # * `~/.aws/credentials`
143
+ # * `~/.aws/config`
144
+ #
145
+ # @option options [String] :access_key_id
146
+ #
147
+ # @option options [Boolean] :active_endpoint_cache (false)
148
+ # When set to `true`, a thread polling for endpoints will be running in
149
+ # the background every 60 secs (default). Defaults to `false`.
150
+ #
151
+ # @option options [Boolean] :adaptive_retry_wait_to_fill (true)
152
+ # Used only in `adaptive` retry mode. When true, the request will sleep
153
+ # until there is sufficent client side capacity to retry the request.
154
+ # When false, the request will raise a `RetryCapacityNotAvailableError` and will
155
+ # not retry instead of sleeping.
156
+ #
157
+ # @option options [Boolean] :client_side_monitoring (false)
158
+ # When `true`, client-side metrics will be collected for all API requests from
159
+ # this client.
160
+ #
161
+ # @option options [String] :client_side_monitoring_client_id ("")
162
+ # Allows you to provide an identifier for this client which will be attached to
163
+ # all generated client side metrics. Defaults to an empty string.
164
+ #
165
+ # @option options [String] :client_side_monitoring_host ("127.0.0.1")
166
+ # Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client
167
+ # side monitoring agent is running on, where client metrics will be published via UDP.
168
+ #
169
+ # @option options [Integer] :client_side_monitoring_port (31000)
170
+ # Required for publishing client metrics. The port that the client side monitoring
171
+ # agent is running on, where client metrics will be published via UDP.
172
+ #
173
+ # @option options [Aws::ClientSideMonitoring::Publisher] :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher)
174
+ # Allows you to provide a custom client-side monitoring publisher class. By default,
175
+ # will use the Client Side Monitoring Agent Publisher.
176
+ #
177
+ # @option options [Boolean] :convert_params (true)
178
+ # When `true`, an attempt is made to coerce request parameters into
179
+ # the required types.
180
+ #
181
+ # @option options [Boolean] :correct_clock_skew (true)
182
+ # Used only in `standard` and adaptive retry modes. Specifies whether to apply
183
+ # a clock skew correction and retry requests with skewed client clocks.
184
+ #
185
+ # @option options [String] :defaults_mode ("legacy")
186
+ # See {Aws::DefaultsModeConfiguration} for a list of the
187
+ # accepted modes and the configuration defaults that are included.
188
+ #
189
+ # @option options [Boolean] :disable_host_prefix_injection (false)
190
+ # Set to true to disable SDK automatically adding host prefix
191
+ # to default service endpoint when available.
192
+ #
193
+ # @option options [String] :endpoint
194
+ # The client endpoint is normally constructed from the `:region`
195
+ # option. You should only configure an `:endpoint` when connecting
196
+ # to test or custom endpoints. This should be a valid HTTP(S) URI.
197
+ #
198
+ # @option options [Integer] :endpoint_cache_max_entries (1000)
199
+ # Used for the maximum size limit of the LRU cache storing endpoints data
200
+ # for endpoint discovery enabled operations. Defaults to 1000.
201
+ #
202
+ # @option options [Integer] :endpoint_cache_max_threads (10)
203
+ # Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.
204
+ #
205
+ # @option options [Integer] :endpoint_cache_poll_interval (60)
206
+ # When :endpoint_discovery and :active_endpoint_cache is enabled,
207
+ # Use this option to config the time interval in seconds for making
208
+ # requests fetching endpoints information. Defaults to 60 sec.
209
+ #
210
+ # @option options [Boolean] :endpoint_discovery (false)
211
+ # When set to `true`, endpoint discovery will be enabled for operations when available.
212
+ #
213
+ # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
214
+ # The log formatter.
215
+ #
216
+ # @option options [Symbol] :log_level (:info)
217
+ # The log level to send messages to the `:logger` at.
218
+ #
219
+ # @option options [Logger] :logger
220
+ # The Logger instance to send log messages to. If this option
221
+ # is not set, logging will be disabled.
222
+ #
223
+ # @option options [Integer] :max_attempts (3)
224
+ # An integer representing the maximum number attempts that will be made for
225
+ # a single request, including the initial attempt. For example,
226
+ # setting this value to 5 will result in a request being retried up to
227
+ # 4 times. Used in `standard` and `adaptive` retry modes.
228
+ #
229
+ # @option options [String] :profile ("default")
230
+ # Used when loading credentials from the shared credentials file
231
+ # at HOME/.aws/credentials. When not specified, 'default' is used.
232
+ #
233
+ # @option options [Proc] :retry_backoff
234
+ # A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
235
+ # This option is only used in the `legacy` retry mode.
236
+ #
237
+ # @option options [Float] :retry_base_delay (0.3)
238
+ # The base delay in seconds used by the default backoff function. This option
239
+ # is only used in the `legacy` retry mode.
240
+ #
241
+ # @option options [Symbol] :retry_jitter (:none)
242
+ # A delay randomiser function used by the default backoff function.
243
+ # Some predefined functions can be referenced by name - :none, :equal, :full,
244
+ # otherwise a Proc that takes and returns a number. This option is only used
245
+ # in the `legacy` retry mode.
246
+ #
247
+ # @see https://www.awsarchitectureblog.com/2015/03/backoff.html
248
+ #
249
+ # @option options [Integer] :retry_limit (3)
250
+ # The maximum number of times to retry failed requests. Only
251
+ # ~ 500 level server errors and certain ~ 400 level client errors
252
+ # are retried. Generally, these are throttling errors, data
253
+ # checksum errors, networking errors, timeout errors, auth errors,
254
+ # endpoint discovery, and errors from expired credentials.
255
+ # This option is only used in the `legacy` retry mode.
256
+ #
257
+ # @option options [Integer] :retry_max_delay (0)
258
+ # The maximum number of seconds to delay between retries (0 for no limit)
259
+ # used by the default backoff function. This option is only used in the
260
+ # `legacy` retry mode.
261
+ #
262
+ # @option options [String] :retry_mode ("legacy")
263
+ # Specifies which retry algorithm to use. Values are:
264
+ #
265
+ # * `legacy` - The pre-existing retry behavior. This is default value if
266
+ # no retry mode is provided.
267
+ #
268
+ # * `standard` - A standardized set of retry rules across the AWS SDKs.
269
+ # This includes support for retry quotas, which limit the number of
270
+ # unsuccessful retries a client can make.
271
+ #
272
+ # * `adaptive` - An experimental retry mode that includes all the
273
+ # functionality of `standard` mode along with automatic client side
274
+ # throttling. This is a provisional mode that may change behavior
275
+ # in the future.
276
+ #
277
+ #
278
+ # @option options [String] :sdk_ua_app_id
279
+ # A unique and opaque application ID that is appended to the
280
+ # User-Agent header as app/<sdk_ua_app_id>. It should have a
281
+ # maximum length of 50.
282
+ #
283
+ # @option options [String] :secret_access_key
284
+ #
285
+ # @option options [String] :session_token
286
+ #
287
+ # @option options [Boolean] :stub_responses (false)
288
+ # Causes the client to return stubbed responses. By default
289
+ # fake responses are generated and returned. You can specify
290
+ # the response data to return or errors to raise by calling
291
+ # {ClientStubs#stub_responses}. See {ClientStubs} for more information.
292
+ #
293
+ # ** Please note ** When response stubbing is enabled, no HTTP
294
+ # requests are made, and retries are disabled.
295
+ #
296
+ # @option options [Aws::TokenProvider] :token_provider
297
+ # A Bearer Token Provider. This can be an instance of any one of the
298
+ # following classes:
299
+ #
300
+ # * `Aws::StaticTokenProvider` - Used for configuring static, non-refreshing
301
+ # tokens.
302
+ #
303
+ # * `Aws::SSOTokenProvider` - Used for loading tokens from AWS SSO using an
304
+ # access token generated from `aws login`.
305
+ #
306
+ # When `:token_provider` is not configured directly, the `Aws::TokenProviderChain`
307
+ # will be used to search for tokens configured for your profile in shared configuration files.
308
+ #
309
+ # @option options [Boolean] :use_dualstack_endpoint
310
+ # When set to `true`, dualstack enabled endpoints (with `.aws` TLD)
311
+ # will be used if available.
312
+ #
313
+ # @option options [Boolean] :use_fips_endpoint
314
+ # When set to `true`, fips compatible endpoints will be used if available.
315
+ # When a `fips` region is used, the region is normalized and this config
316
+ # is set to `true`.
317
+ #
318
+ # @option options [Boolean] :validate_params (true)
319
+ # When `true`, request parameters are validated before
320
+ # sending the request.
321
+ #
322
+ # @option options [Aws::CodeGuruSecurity::EndpointProvider] :endpoint_provider
323
+ # The endpoint provider used to resolve endpoints. Any object that responds to `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to `Aws::CodeGuruSecurity::EndpointParameters`
324
+ #
325
+ # @option options [URI::HTTP,String] :http_proxy A proxy to send
326
+ # requests through. Formatted like 'http://proxy.com:123'.
327
+ #
328
+ # @option options [Float] :http_open_timeout (15) The number of
329
+ # seconds to wait when opening a HTTP session before raising a
330
+ # `Timeout::Error`.
331
+ #
332
+ # @option options [Float] :http_read_timeout (60) The default
333
+ # number of seconds to wait for response data. This value can
334
+ # safely be set per-request on the session.
335
+ #
336
+ # @option options [Float] :http_idle_timeout (5) The number of
337
+ # seconds a connection is allowed to sit idle before it is
338
+ # considered stale. Stale connections are closed and removed
339
+ # from the pool before making a request.
340
+ #
341
+ # @option options [Float] :http_continue_timeout (1) The number of
342
+ # seconds to wait for a 100-continue response before sending the
343
+ # request body. This option has no effect unless the request has
344
+ # "Expect" header set to "100-continue". Defaults to `nil` which
345
+ # disables this behaviour. This value can safely be set per
346
+ # request on the session.
347
+ #
348
+ # @option options [Float] :ssl_timeout (nil) Sets the SSL timeout
349
+ # in seconds.
350
+ #
351
+ # @option options [Boolean] :http_wire_trace (false) When `true`,
352
+ # HTTP debug output will be sent to the `:logger`.
353
+ #
354
+ # @option options [Boolean] :ssl_verify_peer (true) When `true`,
355
+ # SSL peer certificates are verified when establishing a
356
+ # connection.
357
+ #
358
+ # @option options [String] :ssl_ca_bundle Full path to the SSL
359
+ # certificate authority bundle file that should be used when
360
+ # verifying peer certificates. If you do not pass
361
+ # `:ssl_ca_bundle` or `:ssl_ca_directory` the the system default
362
+ # will be used if available.
363
+ #
364
+ # @option options [String] :ssl_ca_directory Full path of the
365
+ # directory that contains the unbundled SSL certificate
366
+ # authority files for verifying peer certificates. If you do
367
+ # not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the
368
+ # system default will be used if available.
369
+ #
370
+ def initialize(*args)
371
+ super
372
+ end
373
+
374
+ # @!group API Operations
375
+
376
+ # Returns a list of all requested findings.
377
+ #
378
+ # @option params [required, Array<Types::FindingIdentifier>] :finding_identifiers
379
+ # A list of finding identifiers. Each identifier consists of a
380
+ # `scanName` and a `findingId`. You retrieve the `findingId` when you
381
+ # call `GetFindings`.
382
+ #
383
+ # @return [Types::BatchGetFindingsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
384
+ #
385
+ # * {Types::BatchGetFindingsResponse#failed_findings #failed_findings} => Array&lt;Types::BatchGetFindingsError&gt;
386
+ # * {Types::BatchGetFindingsResponse#findings #findings} => Array&lt;Types::Finding&gt;
387
+ #
388
+ # @example Request syntax with placeholder values
389
+ #
390
+ # resp = client.batch_get_findings({
391
+ # finding_identifiers: [ # required
392
+ # {
393
+ # finding_id: "String", # required
394
+ # scan_name: "String", # required
395
+ # },
396
+ # ],
397
+ # })
398
+ #
399
+ # @example Response structure
400
+ #
401
+ # resp.failed_findings #=> Array
402
+ # resp.failed_findings[0].error_code #=> String, one of "DUPLICATE_IDENTIFIER", "ITEM_DOES_NOT_EXIST", "INTERNAL_ERROR", "INVALID_FINDING_ID", "INVALID_SCAN_NAME"
403
+ # resp.failed_findings[0].finding_id #=> String
404
+ # resp.failed_findings[0].message #=> String
405
+ # resp.failed_findings[0].scan_name #=> String
406
+ # resp.findings #=> Array
407
+ # resp.findings[0].created_at #=> Time
408
+ # resp.findings[0].description #=> String
409
+ # resp.findings[0].detector_id #=> String
410
+ # resp.findings[0].detector_name #=> String
411
+ # resp.findings[0].detector_tags #=> Array
412
+ # resp.findings[0].detector_tags[0] #=> String
413
+ # resp.findings[0].generator_id #=> String
414
+ # resp.findings[0].id #=> String
415
+ # resp.findings[0].remediation.recommendation.text #=> String
416
+ # resp.findings[0].remediation.recommendation.url #=> String
417
+ # resp.findings[0].remediation.suggested_fixes #=> Array
418
+ # resp.findings[0].remediation.suggested_fixes[0].code #=> String
419
+ # resp.findings[0].remediation.suggested_fixes[0].description #=> String
420
+ # resp.findings[0].resource.id #=> String
421
+ # resp.findings[0].resource.sub_resource_id #=> String
422
+ # resp.findings[0].rule_id #=> String
423
+ # resp.findings[0].severity #=> String, one of "Critical", "High", "Medium", "Low", "Info"
424
+ # resp.findings[0].status #=> String, one of "Closed", "Open", "All"
425
+ # resp.findings[0].title #=> String
426
+ # resp.findings[0].type #=> String
427
+ # resp.findings[0].updated_at #=> Time
428
+ # resp.findings[0].vulnerability.file_path.code_snippet #=> Array
429
+ # resp.findings[0].vulnerability.file_path.code_snippet[0].content #=> String
430
+ # resp.findings[0].vulnerability.file_path.code_snippet[0].number #=> Integer
431
+ # resp.findings[0].vulnerability.file_path.end_line #=> Integer
432
+ # resp.findings[0].vulnerability.file_path.name #=> String
433
+ # resp.findings[0].vulnerability.file_path.path #=> String
434
+ # resp.findings[0].vulnerability.file_path.start_line #=> Integer
435
+ # resp.findings[0].vulnerability.id #=> String
436
+ # resp.findings[0].vulnerability.item_count #=> Integer
437
+ # resp.findings[0].vulnerability.reference_urls #=> Array
438
+ # resp.findings[0].vulnerability.reference_urls[0] #=> String
439
+ # resp.findings[0].vulnerability.related_vulnerabilities #=> Array
440
+ # resp.findings[0].vulnerability.related_vulnerabilities[0] #=> String
441
+ #
442
+ # @see http://docs.aws.amazon.com/goto/WebAPI/codeguru-security-2018-05-10/BatchGetFindings AWS API Documentation
443
+ #
444
+ # @overload batch_get_findings(params = {})
445
+ # @param [Hash] params ({})
446
+ def batch_get_findings(params = {}, options = {})
447
+ req = build_request(:batch_get_findings, params)
448
+ req.send_request(options)
449
+ end
450
+
451
+ # Use to create a scan using code uploaded to an S3 bucket.
452
+ #
453
+ # @option params [String] :analysis_type
454
+ # The type of analysis you want CodeGuru Security to perform in the
455
+ # scan, either `Security` or `All`. The `Secuirty` type only generates
456
+ # findings related to security. The `All` type generates both security
457
+ # findings and quality findings. Defaults to `Security` type if missing.
458
+ #
459
+ # @option params [String] :client_token
460
+ # The idempotency token for the request. Amazon CodeGuru Security uses
461
+ # this value to prevent the accidental creation of duplicate scans if
462
+ # there are failures and retries.
463
+ #
464
+ # **A suitable default value is auto-generated.** You should normally
465
+ # not need to pass this option.**
466
+ #
467
+ # @option params [required, Types::ResourceId] :resource_id
468
+ # The identifier for an input resource used to create a scan.
469
+ #
470
+ # @option params [required, String] :scan_name
471
+ # The unique name that CodeGuru Security uses to track revisions across
472
+ # multiple scans of the same resource. Only allowed for a `STANDARD`
473
+ # scan type. If not specified, it will be auto generated.
474
+ #
475
+ # @option params [String] :scan_type
476
+ # The type of scan, either `Standard` or `Express`. Defaults to
477
+ # `Standard` type if missing.
478
+ #
479
+ # `Express` scans run on limited resources and use a limited set of
480
+ # detectors to analyze your code in near-real time. `Standard` scans
481
+ # have standard resource limits and use the full set of detectors to
482
+ # analyze your code.
483
+ #
484
+ # @option params [Hash<String,String>] :tags
485
+ # An array of key-value pairs used to tag a scan. A tag is a custom
486
+ # attribute label with two parts:
487
+ #
488
+ # * A tag key. For example, `CostCenter`, `Environment`, or `Secret`.
489
+ # Tag keys are case sensitive.
490
+ #
491
+ # * An optional tag value field. For example, `111122223333`,
492
+ # `Production`, or a team name. Omitting the tag value is the same as
493
+ # using an empty string. Tag values are case sensitive.
494
+ #
495
+ # @return [Types::CreateScanResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
496
+ #
497
+ # * {Types::CreateScanResponse#resource_id #resource_id} => Types::ResourceId
498
+ # * {Types::CreateScanResponse#run_id #run_id} => String
499
+ # * {Types::CreateScanResponse#scan_name #scan_name} => String
500
+ # * {Types::CreateScanResponse#scan_name_arn #scan_name_arn} => String
501
+ # * {Types::CreateScanResponse#scan_state #scan_state} => String
502
+ #
503
+ # @example Request syntax with placeholder values
504
+ #
505
+ # resp = client.create_scan({
506
+ # analysis_type: "Security", # accepts Security, All
507
+ # client_token: "ClientToken",
508
+ # resource_id: { # required
509
+ # code_artifact_id: "Uuid",
510
+ # },
511
+ # scan_name: "ScanName", # required
512
+ # scan_type: "Standard", # accepts Standard, Express
513
+ # tags: {
514
+ # "TagKey" => "TagValue",
515
+ # },
516
+ # })
517
+ #
518
+ # @example Response structure
519
+ #
520
+ # resp.resource_id.code_artifact_id #=> String
521
+ # resp.run_id #=> String
522
+ # resp.scan_name #=> String
523
+ # resp.scan_name_arn #=> String
524
+ # resp.scan_state #=> String, one of "InProgress", "Successful", "Failed"
525
+ #
526
+ # @see http://docs.aws.amazon.com/goto/WebAPI/codeguru-security-2018-05-10/CreateScan AWS API Documentation
527
+ #
528
+ # @overload create_scan(params = {})
529
+ # @param [Hash] params ({})
530
+ def create_scan(params = {}, options = {})
531
+ req = build_request(:create_scan, params)
532
+ req.send_request(options)
533
+ end
534
+
535
+ # Generates a pre-signed URL and request headers used to upload a code
536
+ # resource.
537
+ #
538
+ # You can upload your code resource to the URL and add the request
539
+ # headers using any HTTP client.
540
+ #
541
+ # @option params [required, String] :scan_name
542
+ # The name of the scan that will use the uploaded resource. CodeGuru
543
+ # Security uses the unique scan name to track revisions across multiple
544
+ # scans of the same resource. Use this `scanName` when you call
545
+ # `CreateScan` on the code resource you upload to this URL.
546
+ #
547
+ # @return [Types::CreateUploadUrlResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
548
+ #
549
+ # * {Types::CreateUploadUrlResponse#code_artifact_id #code_artifact_id} => String
550
+ # * {Types::CreateUploadUrlResponse#request_headers #request_headers} => Hash&lt;String,String&gt;
551
+ # * {Types::CreateUploadUrlResponse#s3_url #s3_url} => String
552
+ #
553
+ # @example Request syntax with placeholder values
554
+ #
555
+ # resp = client.create_upload_url({
556
+ # scan_name: "ScanName", # required
557
+ # })
558
+ #
559
+ # @example Response structure
560
+ #
561
+ # resp.code_artifact_id #=> String
562
+ # resp.request_headers #=> Hash
563
+ # resp.request_headers["HeaderKey"] #=> String
564
+ # resp.s3_url #=> String
565
+ #
566
+ # @see http://docs.aws.amazon.com/goto/WebAPI/codeguru-security-2018-05-10/CreateUploadUrl AWS API Documentation
567
+ #
568
+ # @overload create_upload_url(params = {})
569
+ # @param [Hash] params ({})
570
+ def create_upload_url(params = {}, options = {})
571
+ req = build_request(:create_upload_url, params)
572
+ req.send_request(options)
573
+ end
574
+
575
+ # Use to get account level configuration.
576
+ #
577
+ # @return [Types::GetAccountConfigurationResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
578
+ #
579
+ # * {Types::GetAccountConfigurationResponse#encryption_config #encryption_config} => Types::EncryptionConfig
580
+ #
581
+ # @example Response structure
582
+ #
583
+ # resp.encryption_config.kms_key_arn #=> String
584
+ #
585
+ # @see http://docs.aws.amazon.com/goto/WebAPI/codeguru-security-2018-05-10/GetAccountConfiguration AWS API Documentation
586
+ #
587
+ # @overload get_account_configuration(params = {})
588
+ # @param [Hash] params ({})
589
+ def get_account_configuration(params = {}, options = {})
590
+ req = build_request(:get_account_configuration, params)
591
+ req.send_request(options)
592
+ end
593
+
594
+ # Returns a list of all findings generated by a particular scan.
595
+ #
596
+ # @option params [Integer] :max_results
597
+ # The maximum number of results to return in the response. Use this
598
+ # parameter when paginating results. If additional results exist beyond
599
+ # the number you specify, the `nextToken` element is returned in the
600
+ # response. Use `nextToken` in a subsequent request to retrieve
601
+ # additional results.
602
+ #
603
+ # @option params [String] :next_token
604
+ # A token to use for paginating results that are returned in the
605
+ # response. Set the value of this parameter to null for the first
606
+ # request. For subsequent calls, use the `nextToken` value returned from
607
+ # the previous request to continue listing results after the first page.
608
+ #
609
+ # @option params [required, String] :scan_name
610
+ # The name of the scan you want to retrieve findings from.
611
+ #
612
+ # @option params [String] :status
613
+ # The status of the findings you want to get. Pass either `Open`,
614
+ # `Closed`, or `All`.
615
+ #
616
+ # @return [Types::GetFindingsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
617
+ #
618
+ # * {Types::GetFindingsResponse#findings #findings} => Array&lt;Types::Finding&gt;
619
+ # * {Types::GetFindingsResponse#next_token #next_token} => String
620
+ #
621
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
622
+ #
623
+ # @example Request syntax with placeholder values
624
+ #
625
+ # resp = client.get_findings({
626
+ # max_results: 1,
627
+ # next_token: "NextToken",
628
+ # scan_name: "ScanName", # required
629
+ # status: "Closed", # accepts Closed, Open, All
630
+ # })
631
+ #
632
+ # @example Response structure
633
+ #
634
+ # resp.findings #=> Array
635
+ # resp.findings[0].created_at #=> Time
636
+ # resp.findings[0].description #=> String
637
+ # resp.findings[0].detector_id #=> String
638
+ # resp.findings[0].detector_name #=> String
639
+ # resp.findings[0].detector_tags #=> Array
640
+ # resp.findings[0].detector_tags[0] #=> String
641
+ # resp.findings[0].generator_id #=> String
642
+ # resp.findings[0].id #=> String
643
+ # resp.findings[0].remediation.recommendation.text #=> String
644
+ # resp.findings[0].remediation.recommendation.url #=> String
645
+ # resp.findings[0].remediation.suggested_fixes #=> Array
646
+ # resp.findings[0].remediation.suggested_fixes[0].code #=> String
647
+ # resp.findings[0].remediation.suggested_fixes[0].description #=> String
648
+ # resp.findings[0].resource.id #=> String
649
+ # resp.findings[0].resource.sub_resource_id #=> String
650
+ # resp.findings[0].rule_id #=> String
651
+ # resp.findings[0].severity #=> String, one of "Critical", "High", "Medium", "Low", "Info"
652
+ # resp.findings[0].status #=> String, one of "Closed", "Open", "All"
653
+ # resp.findings[0].title #=> String
654
+ # resp.findings[0].type #=> String
655
+ # resp.findings[0].updated_at #=> Time
656
+ # resp.findings[0].vulnerability.file_path.code_snippet #=> Array
657
+ # resp.findings[0].vulnerability.file_path.code_snippet[0].content #=> String
658
+ # resp.findings[0].vulnerability.file_path.code_snippet[0].number #=> Integer
659
+ # resp.findings[0].vulnerability.file_path.end_line #=> Integer
660
+ # resp.findings[0].vulnerability.file_path.name #=> String
661
+ # resp.findings[0].vulnerability.file_path.path #=> String
662
+ # resp.findings[0].vulnerability.file_path.start_line #=> Integer
663
+ # resp.findings[0].vulnerability.id #=> String
664
+ # resp.findings[0].vulnerability.item_count #=> Integer
665
+ # resp.findings[0].vulnerability.reference_urls #=> Array
666
+ # resp.findings[0].vulnerability.reference_urls[0] #=> String
667
+ # resp.findings[0].vulnerability.related_vulnerabilities #=> Array
668
+ # resp.findings[0].vulnerability.related_vulnerabilities[0] #=> String
669
+ # resp.next_token #=> String
670
+ #
671
+ # @see http://docs.aws.amazon.com/goto/WebAPI/codeguru-security-2018-05-10/GetFindings AWS API Documentation
672
+ #
673
+ # @overload get_findings(params = {})
674
+ # @param [Hash] params ({})
675
+ def get_findings(params = {}, options = {})
676
+ req = build_request(:get_findings, params)
677
+ req.send_request(options)
678
+ end
679
+
680
+ # Returns top level metrics about an account from a specified date,
681
+ # including number of open findings, the categories with most findings,
682
+ # the scans with most open findings, and scans with most open critical
683
+ # findings.
684
+ #
685
+ # @option params [required, Time,DateTime,Date,Integer,String] :date
686
+ # The date you want to retrieve summary metrics from, rounded to the
687
+ # nearest day. The date must be within the past two years since metrics
688
+ # data is only stored for two years. If a date outside of this range is
689
+ # passed, the response will be empty.
690
+ #
691
+ # @return [Types::GetMetricsSummaryResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
692
+ #
693
+ # * {Types::GetMetricsSummaryResponse#metrics_summary #metrics_summary} => Types::MetricsSummary
694
+ #
695
+ # @example Request syntax with placeholder values
696
+ #
697
+ # resp = client.get_metrics_summary({
698
+ # date: Time.now, # required
699
+ # })
700
+ #
701
+ # @example Response structure
702
+ #
703
+ # resp.metrics_summary.categories_with_most_findings #=> Array
704
+ # resp.metrics_summary.categories_with_most_findings[0].category_name #=> String
705
+ # resp.metrics_summary.categories_with_most_findings[0].finding_number #=> Integer
706
+ # resp.metrics_summary.date #=> Time
707
+ # resp.metrics_summary.open_findings.critical #=> Float
708
+ # resp.metrics_summary.open_findings.high #=> Float
709
+ # resp.metrics_summary.open_findings.info #=> Float
710
+ # resp.metrics_summary.open_findings.low #=> Float
711
+ # resp.metrics_summary.open_findings.medium #=> Float
712
+ # resp.metrics_summary.scans_with_most_open_critical_findings #=> Array
713
+ # resp.metrics_summary.scans_with_most_open_critical_findings[0].finding_number #=> Integer
714
+ # resp.metrics_summary.scans_with_most_open_critical_findings[0].scan_name #=> String
715
+ # resp.metrics_summary.scans_with_most_open_findings #=> Array
716
+ # resp.metrics_summary.scans_with_most_open_findings[0].finding_number #=> Integer
717
+ # resp.metrics_summary.scans_with_most_open_findings[0].scan_name #=> String
718
+ #
719
+ # @see http://docs.aws.amazon.com/goto/WebAPI/codeguru-security-2018-05-10/GetMetricsSummary AWS API Documentation
720
+ #
721
+ # @overload get_metrics_summary(params = {})
722
+ # @param [Hash] params ({})
723
+ def get_metrics_summary(params = {}, options = {})
724
+ req = build_request(:get_metrics_summary, params)
725
+ req.send_request(options)
726
+ end
727
+
728
+ # Returns details about a scan, including whether or not a scan has
729
+ # completed.
730
+ #
731
+ # @option params [String] :run_id
732
+ # UUID that identifies the individual scan run you want to view details
733
+ # about. You retrieve this when you call the `CreateScan` operation.
734
+ # Defaults to the latest scan run if missing.
735
+ #
736
+ # @option params [required, String] :scan_name
737
+ # The name of the scan you want to view details about.
738
+ #
739
+ # @return [Types::GetScanResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
740
+ #
741
+ # * {Types::GetScanResponse#analysis_type #analysis_type} => String
742
+ # * {Types::GetScanResponse#created_at #created_at} => Time
743
+ # * {Types::GetScanResponse#number_of_revisions #number_of_revisions} => Integer
744
+ # * {Types::GetScanResponse#run_id #run_id} => String
745
+ # * {Types::GetScanResponse#scan_name #scan_name} => String
746
+ # * {Types::GetScanResponse#scan_name_arn #scan_name_arn} => String
747
+ # * {Types::GetScanResponse#scan_state #scan_state} => String
748
+ # * {Types::GetScanResponse#updated_at #updated_at} => Time
749
+ #
750
+ # @example Request syntax with placeholder values
751
+ #
752
+ # resp = client.get_scan({
753
+ # run_id: "Uuid",
754
+ # scan_name: "ScanName", # required
755
+ # })
756
+ #
757
+ # @example Response structure
758
+ #
759
+ # resp.analysis_type #=> String, one of "Security", "All"
760
+ # resp.created_at #=> Time
761
+ # resp.number_of_revisions #=> Integer
762
+ # resp.run_id #=> String
763
+ # resp.scan_name #=> String
764
+ # resp.scan_name_arn #=> String
765
+ # resp.scan_state #=> String, one of "InProgress", "Successful", "Failed"
766
+ # resp.updated_at #=> Time
767
+ #
768
+ # @see http://docs.aws.amazon.com/goto/WebAPI/codeguru-security-2018-05-10/GetScan AWS API Documentation
769
+ #
770
+ # @overload get_scan(params = {})
771
+ # @param [Hash] params ({})
772
+ def get_scan(params = {}, options = {})
773
+ req = build_request(:get_scan, params)
774
+ req.send_request(options)
775
+ end
776
+
777
+ # Returns metrics about all findings in an account within a specified
778
+ # time range.
779
+ #
780
+ # @option params [required, Time,DateTime,Date,Integer,String] :end_date
781
+ # The end date of the interval which you want to retrieve metrics from.
782
+ #
783
+ # @option params [Integer] :max_results
784
+ # The maximum number of results to return in the response. Use this
785
+ # parameter when paginating results. If additional results exist beyond
786
+ # the number you specify, the `nextToken` element is returned in the
787
+ # response. Use `nextToken` in a subsequent request to retrieve
788
+ # additional results.
789
+ #
790
+ # @option params [String] :next_token
791
+ # A token to use for paginating results that are returned in the
792
+ # response. Set the value of this parameter to null for the first
793
+ # request. For subsequent calls, use the `nextToken` value returned from
794
+ # the previous request to continue listing results after the first page.
795
+ #
796
+ # @option params [required, Time,DateTime,Date,Integer,String] :start_date
797
+ # The start date of the interval which you want to retrieve metrics
798
+ # from.
799
+ #
800
+ # @return [Types::ListFindingsMetricsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
801
+ #
802
+ # * {Types::ListFindingsMetricsResponse#findings_metrics #findings_metrics} => Array&lt;Types::AccountFindingsMetric&gt;
803
+ # * {Types::ListFindingsMetricsResponse#next_token #next_token} => String
804
+ #
805
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
806
+ #
807
+ # @example Request syntax with placeholder values
808
+ #
809
+ # resp = client.list_findings_metrics({
810
+ # end_date: Time.now, # required
811
+ # max_results: 1,
812
+ # next_token: "NextToken",
813
+ # start_date: Time.now, # required
814
+ # })
815
+ #
816
+ # @example Response structure
817
+ #
818
+ # resp.findings_metrics #=> Array
819
+ # resp.findings_metrics[0].closed_findings.critical #=> Float
820
+ # resp.findings_metrics[0].closed_findings.high #=> Float
821
+ # resp.findings_metrics[0].closed_findings.info #=> Float
822
+ # resp.findings_metrics[0].closed_findings.low #=> Float
823
+ # resp.findings_metrics[0].closed_findings.medium #=> Float
824
+ # resp.findings_metrics[0].date #=> Time
825
+ # resp.findings_metrics[0].mean_time_to_close.critical #=> Float
826
+ # resp.findings_metrics[0].mean_time_to_close.high #=> Float
827
+ # resp.findings_metrics[0].mean_time_to_close.info #=> Float
828
+ # resp.findings_metrics[0].mean_time_to_close.low #=> Float
829
+ # resp.findings_metrics[0].mean_time_to_close.medium #=> Float
830
+ # resp.findings_metrics[0].new_findings.critical #=> Float
831
+ # resp.findings_metrics[0].new_findings.high #=> Float
832
+ # resp.findings_metrics[0].new_findings.info #=> Float
833
+ # resp.findings_metrics[0].new_findings.low #=> Float
834
+ # resp.findings_metrics[0].new_findings.medium #=> Float
835
+ # resp.findings_metrics[0].open_findings.critical #=> Float
836
+ # resp.findings_metrics[0].open_findings.high #=> Float
837
+ # resp.findings_metrics[0].open_findings.info #=> Float
838
+ # resp.findings_metrics[0].open_findings.low #=> Float
839
+ # resp.findings_metrics[0].open_findings.medium #=> Float
840
+ # resp.next_token #=> String
841
+ #
842
+ # @see http://docs.aws.amazon.com/goto/WebAPI/codeguru-security-2018-05-10/ListFindingsMetrics AWS API Documentation
843
+ #
844
+ # @overload list_findings_metrics(params = {})
845
+ # @param [Hash] params ({})
846
+ def list_findings_metrics(params = {}, options = {})
847
+ req = build_request(:list_findings_metrics, params)
848
+ req.send_request(options)
849
+ end
850
+
851
+ # Returns a list of all the scans in an account.
852
+ #
853
+ # @option params [Integer] :max_results
854
+ # The maximum number of results to return in the response. Use this
855
+ # parameter when paginating results. If additional results exist beyond
856
+ # the number you specify, the `nextToken` element is returned in the
857
+ # response. Use `nextToken` in a subsequent request to retrieve
858
+ # additional results.
859
+ #
860
+ # @option params [String] :next_token
861
+ # A token to use for paginating results that are returned in the
862
+ # response. Set the value of this parameter to null for the first
863
+ # request. For subsequent calls, use the `nextToken` value returned from
864
+ # the previous request to continue listing results after the first page.
865
+ #
866
+ # @return [Types::ListScansResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
867
+ #
868
+ # * {Types::ListScansResponse#next_token #next_token} => String
869
+ # * {Types::ListScansResponse#summaries #summaries} => Array&lt;Types::ScanSummary&gt;
870
+ #
871
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
872
+ #
873
+ # @example Request syntax with placeholder values
874
+ #
875
+ # resp = client.list_scans({
876
+ # max_results: 1,
877
+ # next_token: "NextToken",
878
+ # })
879
+ #
880
+ # @example Response structure
881
+ #
882
+ # resp.next_token #=> String
883
+ # resp.summaries #=> Array
884
+ # resp.summaries[0].created_at #=> Time
885
+ # resp.summaries[0].run_id #=> String
886
+ # resp.summaries[0].scan_name #=> String
887
+ # resp.summaries[0].scan_name_arn #=> String
888
+ # resp.summaries[0].scan_state #=> String, one of "InProgress", "Successful", "Failed"
889
+ # resp.summaries[0].updated_at #=> Time
890
+ #
891
+ # @see http://docs.aws.amazon.com/goto/WebAPI/codeguru-security-2018-05-10/ListScans AWS API Documentation
892
+ #
893
+ # @overload list_scans(params = {})
894
+ # @param [Hash] params ({})
895
+ def list_scans(params = {}, options = {})
896
+ req = build_request(:list_scans, params)
897
+ req.send_request(options)
898
+ end
899
+
900
+ # Returns a list of all tags associated with a scan.
901
+ #
902
+ # @option params [required, String] :resource_arn
903
+ # The ARN of the `ScanName` object. You can retrieve this ARN by calling
904
+ # `ListScans` or `GetScan`.
905
+ #
906
+ # @return [Types::ListTagsForResourceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
907
+ #
908
+ # * {Types::ListTagsForResourceResponse#tags #tags} => Hash&lt;String,String&gt;
909
+ #
910
+ # @example Request syntax with placeholder values
911
+ #
912
+ # resp = client.list_tags_for_resource({
913
+ # resource_arn: "ScanNameArn", # required
914
+ # })
915
+ #
916
+ # @example Response structure
917
+ #
918
+ # resp.tags #=> Hash
919
+ # resp.tags["TagKey"] #=> String
920
+ #
921
+ # @see http://docs.aws.amazon.com/goto/WebAPI/codeguru-security-2018-05-10/ListTagsForResource AWS API Documentation
922
+ #
923
+ # @overload list_tags_for_resource(params = {})
924
+ # @param [Hash] params ({})
925
+ def list_tags_for_resource(params = {}, options = {})
926
+ req = build_request(:list_tags_for_resource, params)
927
+ req.send_request(options)
928
+ end
929
+
930
+ # Use to add one or more tags to an existing scan.
931
+ #
932
+ # @option params [required, String] :resource_arn
933
+ # The ARN of the `ScanName` object. You can retrieve this ARN by calling
934
+ # `ListScans` or `GetScan`.
935
+ #
936
+ # @option params [required, Hash<String,String>] :tags
937
+ # An array of key-value pairs used to tag an existing scan. A tag is a
938
+ # custom attribute label with two parts:
939
+ #
940
+ # * A tag key. For example, `CostCenter`, `Environment`, or `Secret`.
941
+ # Tag keys are case sensitive.
942
+ #
943
+ # * An optional tag value field. For example, `111122223333`,
944
+ # `Production`, or a team name. Omitting the tag value is the same as
945
+ # using an empty string. Tag values are case sensitive.
946
+ #
947
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
948
+ #
949
+ # @example Request syntax with placeholder values
950
+ #
951
+ # resp = client.tag_resource({
952
+ # resource_arn: "ScanNameArn", # required
953
+ # tags: { # required
954
+ # "TagKey" => "TagValue",
955
+ # },
956
+ # })
957
+ #
958
+ # @see http://docs.aws.amazon.com/goto/WebAPI/codeguru-security-2018-05-10/TagResource AWS API Documentation
959
+ #
960
+ # @overload tag_resource(params = {})
961
+ # @param [Hash] params ({})
962
+ def tag_resource(params = {}, options = {})
963
+ req = build_request(:tag_resource, params)
964
+ req.send_request(options)
965
+ end
966
+
967
+ # Use to remove one or more tags from an existing scan.
968
+ #
969
+ # @option params [required, String] :resource_arn
970
+ # The ARN of the `ScanName` object. You can retrieve this ARN by calling
971
+ # `ListScans` or `GetScan`.
972
+ #
973
+ # @option params [required, Array<String>] :tag_keys
974
+ # A list of keys for each tag you want to remove from a scan.
975
+ #
976
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
977
+ #
978
+ # @example Request syntax with placeholder values
979
+ #
980
+ # resp = client.untag_resource({
981
+ # resource_arn: "ScanNameArn", # required
982
+ # tag_keys: ["TagKey"], # required
983
+ # })
984
+ #
985
+ # @see http://docs.aws.amazon.com/goto/WebAPI/codeguru-security-2018-05-10/UntagResource AWS API Documentation
986
+ #
987
+ # @overload untag_resource(params = {})
988
+ # @param [Hash] params ({})
989
+ def untag_resource(params = {}, options = {})
990
+ req = build_request(:untag_resource, params)
991
+ req.send_request(options)
992
+ end
993
+
994
+ # Use to update account-level configuration with an encryption key.
995
+ #
996
+ # @option params [required, Types::EncryptionConfig] :encryption_config
997
+ # The KMS key ARN you want to use for encryption. Defaults to
998
+ # service-side encryption if missing.
999
+ #
1000
+ # @return [Types::UpdateAccountConfigurationResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1001
+ #
1002
+ # * {Types::UpdateAccountConfigurationResponse#encryption_config #encryption_config} => Types::EncryptionConfig
1003
+ #
1004
+ # @example Request syntax with placeholder values
1005
+ #
1006
+ # resp = client.update_account_configuration({
1007
+ # encryption_config: { # required
1008
+ # kms_key_arn: "KmsKeyArn",
1009
+ # },
1010
+ # })
1011
+ #
1012
+ # @example Response structure
1013
+ #
1014
+ # resp.encryption_config.kms_key_arn #=> String
1015
+ #
1016
+ # @see http://docs.aws.amazon.com/goto/WebAPI/codeguru-security-2018-05-10/UpdateAccountConfiguration AWS API Documentation
1017
+ #
1018
+ # @overload update_account_configuration(params = {})
1019
+ # @param [Hash] params ({})
1020
+ def update_account_configuration(params = {}, options = {})
1021
+ req = build_request(:update_account_configuration, params)
1022
+ req.send_request(options)
1023
+ end
1024
+
1025
+ # @!endgroup
1026
+
1027
+ # @param params ({})
1028
+ # @api private
1029
+ def build_request(operation_name, params = {})
1030
+ handlers = @handlers.for(operation_name)
1031
+ context = Seahorse::Client::RequestContext.new(
1032
+ operation_name: operation_name,
1033
+ operation: config.api.operation(operation_name),
1034
+ client: self,
1035
+ params: params,
1036
+ config: config)
1037
+ context[:gem_name] = 'aws-sdk-codegurusecurity'
1038
+ context[:gem_version] = '1.0.0'
1039
+ Seahorse::Client::Request.new(handlers, context)
1040
+ end
1041
+
1042
+ # @api private
1043
+ # @deprecated
1044
+ def waiter_names
1045
+ []
1046
+ end
1047
+
1048
+ class << self
1049
+
1050
+ # @api private
1051
+ attr_reader :identifier
1052
+
1053
+ # @api private
1054
+ def errors_module
1055
+ Errors
1056
+ end
1057
+
1058
+ end
1059
+ end
1060
+ end