aws-sdk-codebuild 1.88.0 → 1.90.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -1
- data/VERSION +1 -1
- data/lib/aws-sdk-codebuild/client.rb +20 -3
- data/lib/aws-sdk-codebuild/endpoint_parameters.rb +66 -0
- data/lib/aws-sdk-codebuild/endpoint_provider.rb +51 -0
- data/lib/aws-sdk-codebuild/endpoints.rb +645 -0
- data/lib/aws-sdk-codebuild/plugins/endpoints.rb +158 -0
- data/lib/aws-sdk-codebuild/types.rb +0 -1214
- data/lib/aws-sdk-codebuild.rb +5 -1
- metadata +8 -4
@@ -0,0 +1,158 @@
|
|
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
|
+
|
11
|
+
module Aws::CodeBuild
|
12
|
+
module Plugins
|
13
|
+
class Endpoints < Seahorse::Client::Plugin
|
14
|
+
option(
|
15
|
+
:endpoint_provider,
|
16
|
+
doc_type: 'Aws::CodeBuild::EndpointProvider',
|
17
|
+
docstring: 'The endpoint provider used to resolve endpoints. Any '\
|
18
|
+
'object that responds to `#resolve_endpoint(parameters)` '\
|
19
|
+
'where `parameters` is a Struct similar to '\
|
20
|
+
'`Aws::CodeBuild::EndpointParameters`'
|
21
|
+
) do |cfg|
|
22
|
+
Aws::CodeBuild::EndpointProvider.new
|
23
|
+
end
|
24
|
+
|
25
|
+
# @api private
|
26
|
+
class Handler < Seahorse::Client::Handler
|
27
|
+
def call(context)
|
28
|
+
# If endpoint was discovered, do not resolve or apply the endpoint.
|
29
|
+
unless context[:discovered_endpoint]
|
30
|
+
params = parameters_for_operation(context)
|
31
|
+
endpoint = context.config.endpoint_provider.resolve_endpoint(params)
|
32
|
+
|
33
|
+
context.http_request.endpoint = endpoint.url
|
34
|
+
apply_endpoint_headers(context, endpoint.headers)
|
35
|
+
end
|
36
|
+
|
37
|
+
context[:endpoint_params] = params
|
38
|
+
context[:auth_scheme] =
|
39
|
+
Aws::Endpoints.resolve_auth_scheme(context, endpoint)
|
40
|
+
|
41
|
+
@handler.call(context)
|
42
|
+
end
|
43
|
+
|
44
|
+
private
|
45
|
+
|
46
|
+
def apply_endpoint_headers(context, headers)
|
47
|
+
headers.each do |key, values|
|
48
|
+
value = values
|
49
|
+
.compact
|
50
|
+
.map { |s| Seahorse::Util.escape_header_list_string(s.to_s) }
|
51
|
+
.join(',')
|
52
|
+
|
53
|
+
context.http_request.headers[key] = value
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
def parameters_for_operation(context)
|
58
|
+
case context.operation_name
|
59
|
+
when :batch_delete_builds
|
60
|
+
Aws::CodeBuild::Endpoints::BatchDeleteBuilds.build(context)
|
61
|
+
when :batch_get_build_batches
|
62
|
+
Aws::CodeBuild::Endpoints::BatchGetBuildBatches.build(context)
|
63
|
+
when :batch_get_builds
|
64
|
+
Aws::CodeBuild::Endpoints::BatchGetBuilds.build(context)
|
65
|
+
when :batch_get_projects
|
66
|
+
Aws::CodeBuild::Endpoints::BatchGetProjects.build(context)
|
67
|
+
when :batch_get_report_groups
|
68
|
+
Aws::CodeBuild::Endpoints::BatchGetReportGroups.build(context)
|
69
|
+
when :batch_get_reports
|
70
|
+
Aws::CodeBuild::Endpoints::BatchGetReports.build(context)
|
71
|
+
when :create_project
|
72
|
+
Aws::CodeBuild::Endpoints::CreateProject.build(context)
|
73
|
+
when :create_report_group
|
74
|
+
Aws::CodeBuild::Endpoints::CreateReportGroup.build(context)
|
75
|
+
when :create_webhook
|
76
|
+
Aws::CodeBuild::Endpoints::CreateWebhook.build(context)
|
77
|
+
when :delete_build_batch
|
78
|
+
Aws::CodeBuild::Endpoints::DeleteBuildBatch.build(context)
|
79
|
+
when :delete_project
|
80
|
+
Aws::CodeBuild::Endpoints::DeleteProject.build(context)
|
81
|
+
when :delete_report
|
82
|
+
Aws::CodeBuild::Endpoints::DeleteReport.build(context)
|
83
|
+
when :delete_report_group
|
84
|
+
Aws::CodeBuild::Endpoints::DeleteReportGroup.build(context)
|
85
|
+
when :delete_resource_policy
|
86
|
+
Aws::CodeBuild::Endpoints::DeleteResourcePolicy.build(context)
|
87
|
+
when :delete_source_credentials
|
88
|
+
Aws::CodeBuild::Endpoints::DeleteSourceCredentials.build(context)
|
89
|
+
when :delete_webhook
|
90
|
+
Aws::CodeBuild::Endpoints::DeleteWebhook.build(context)
|
91
|
+
when :describe_code_coverages
|
92
|
+
Aws::CodeBuild::Endpoints::DescribeCodeCoverages.build(context)
|
93
|
+
when :describe_test_cases
|
94
|
+
Aws::CodeBuild::Endpoints::DescribeTestCases.build(context)
|
95
|
+
when :get_report_group_trend
|
96
|
+
Aws::CodeBuild::Endpoints::GetReportGroupTrend.build(context)
|
97
|
+
when :get_resource_policy
|
98
|
+
Aws::CodeBuild::Endpoints::GetResourcePolicy.build(context)
|
99
|
+
when :import_source_credentials
|
100
|
+
Aws::CodeBuild::Endpoints::ImportSourceCredentials.build(context)
|
101
|
+
when :invalidate_project_cache
|
102
|
+
Aws::CodeBuild::Endpoints::InvalidateProjectCache.build(context)
|
103
|
+
when :list_build_batches
|
104
|
+
Aws::CodeBuild::Endpoints::ListBuildBatches.build(context)
|
105
|
+
when :list_build_batches_for_project
|
106
|
+
Aws::CodeBuild::Endpoints::ListBuildBatchesForProject.build(context)
|
107
|
+
when :list_builds
|
108
|
+
Aws::CodeBuild::Endpoints::ListBuilds.build(context)
|
109
|
+
when :list_builds_for_project
|
110
|
+
Aws::CodeBuild::Endpoints::ListBuildsForProject.build(context)
|
111
|
+
when :list_curated_environment_images
|
112
|
+
Aws::CodeBuild::Endpoints::ListCuratedEnvironmentImages.build(context)
|
113
|
+
when :list_projects
|
114
|
+
Aws::CodeBuild::Endpoints::ListProjects.build(context)
|
115
|
+
when :list_report_groups
|
116
|
+
Aws::CodeBuild::Endpoints::ListReportGroups.build(context)
|
117
|
+
when :list_reports
|
118
|
+
Aws::CodeBuild::Endpoints::ListReports.build(context)
|
119
|
+
when :list_reports_for_report_group
|
120
|
+
Aws::CodeBuild::Endpoints::ListReportsForReportGroup.build(context)
|
121
|
+
when :list_shared_projects
|
122
|
+
Aws::CodeBuild::Endpoints::ListSharedProjects.build(context)
|
123
|
+
when :list_shared_report_groups
|
124
|
+
Aws::CodeBuild::Endpoints::ListSharedReportGroups.build(context)
|
125
|
+
when :list_source_credentials
|
126
|
+
Aws::CodeBuild::Endpoints::ListSourceCredentials.build(context)
|
127
|
+
when :put_resource_policy
|
128
|
+
Aws::CodeBuild::Endpoints::PutResourcePolicy.build(context)
|
129
|
+
when :retry_build
|
130
|
+
Aws::CodeBuild::Endpoints::RetryBuild.build(context)
|
131
|
+
when :retry_build_batch
|
132
|
+
Aws::CodeBuild::Endpoints::RetryBuildBatch.build(context)
|
133
|
+
when :start_build
|
134
|
+
Aws::CodeBuild::Endpoints::StartBuild.build(context)
|
135
|
+
when :start_build_batch
|
136
|
+
Aws::CodeBuild::Endpoints::StartBuildBatch.build(context)
|
137
|
+
when :stop_build
|
138
|
+
Aws::CodeBuild::Endpoints::StopBuild.build(context)
|
139
|
+
when :stop_build_batch
|
140
|
+
Aws::CodeBuild::Endpoints::StopBuildBatch.build(context)
|
141
|
+
when :update_project
|
142
|
+
Aws::CodeBuild::Endpoints::UpdateProject.build(context)
|
143
|
+
when :update_project_visibility
|
144
|
+
Aws::CodeBuild::Endpoints::UpdateProjectVisibility.build(context)
|
145
|
+
when :update_report_group
|
146
|
+
Aws::CodeBuild::Endpoints::UpdateReportGroup.build(context)
|
147
|
+
when :update_webhook
|
148
|
+
Aws::CodeBuild::Endpoints::UpdateWebhook.build(context)
|
149
|
+
end
|
150
|
+
end
|
151
|
+
end
|
152
|
+
|
153
|
+
def add_handlers(handlers, _config)
|
154
|
+
handlers.add(Handler, step: :build, priority: 75)
|
155
|
+
end
|
156
|
+
end
|
157
|
+
end
|
158
|
+
end
|