google-cloud-orchestration-airflow-service-v1 0.9.2 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -989,6 +989,949 @@ module Google
989
989
  raise ::Google::Cloud::Error.from_error(e)
990
990
  end
991
991
 
992
+ ##
993
+ # Lists workloads in a Cloud Composer environment. Workload is a unit that
994
+ # runs a single Composer component.
995
+ #
996
+ # This method is supported for Cloud Composer environments in versions
997
+ # composer-3.*.*-airflow-*.*.* and newer.
998
+ #
999
+ # @overload list_workloads(request, options = nil)
1000
+ # Pass arguments to `list_workloads` via a request object, either of type
1001
+ # {::Google::Cloud::Orchestration::Airflow::Service::V1::ListWorkloadsRequest} or an equivalent Hash.
1002
+ #
1003
+ # @param request [::Google::Cloud::Orchestration::Airflow::Service::V1::ListWorkloadsRequest, ::Hash]
1004
+ # A request object representing the call parameters. Required. To specify no
1005
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1006
+ # @param options [::Gapic::CallOptions, ::Hash]
1007
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1008
+ #
1009
+ # @overload list_workloads(parent: nil, page_size: nil, page_token: nil, filter: nil)
1010
+ # Pass arguments to `list_workloads` via keyword arguments. Note that at
1011
+ # least one keyword argument is required. To specify no parameters, or to keep all
1012
+ # the default parameter values, pass an empty Hash as a request object (see above).
1013
+ #
1014
+ # @param parent [::String]
1015
+ # Required. The environment name to get workloads for, in the form:
1016
+ # "projects/\\{projectId}/locations/\\{locationId}/environments/\\{environmentId}"
1017
+ # @param page_size [::Integer]
1018
+ # Optional. The maximum number of environments to return.
1019
+ # @param page_token [::String]
1020
+ # Optional. The next_page_token value returned from a previous List request,
1021
+ # if any.
1022
+ # @param filter [::String]
1023
+ # Optional. The list filter.
1024
+ # Currently only supports equality on the type field. The value of a field
1025
+ # specified in the filter expression must be one ComposerWorkloadType enum
1026
+ # option. It's possible to get multiple types using "OR" operator, e.g.:
1027
+ # "type=SCHEDULER OR type=CELERY_WORKER". If not specified, all items are
1028
+ # returned.
1029
+ # @yield [result, operation] Access the result along with the TransportOperation object
1030
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Orchestration::Airflow::Service::V1::ListWorkloadsResponse::ComposerWorkload>]
1031
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1032
+ #
1033
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Orchestration::Airflow::Service::V1::ListWorkloadsResponse::ComposerWorkload>]
1034
+ #
1035
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1036
+ #
1037
+ # @example Basic example
1038
+ # require "google/cloud/orchestration/airflow/service/v1"
1039
+ #
1040
+ # # Create a client object. The client can be reused for multiple calls.
1041
+ # client = Google::Cloud::Orchestration::Airflow::Service::V1::Environments::Rest::Client.new
1042
+ #
1043
+ # # Create a request. To set request fields, pass in keyword arguments.
1044
+ # request = Google::Cloud::Orchestration::Airflow::Service::V1::ListWorkloadsRequest.new
1045
+ #
1046
+ # # Call the list_workloads method.
1047
+ # result = client.list_workloads request
1048
+ #
1049
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1050
+ # # over elements, and API calls will be issued to fetch pages as needed.
1051
+ # result.each do |item|
1052
+ # # Each element is of type ::Google::Cloud::Orchestration::Airflow::Service::V1::ListWorkloadsResponse::ComposerWorkload.
1053
+ # p item
1054
+ # end
1055
+ #
1056
+ def list_workloads request, options = nil
1057
+ raise ::ArgumentError, "request must be provided" if request.nil?
1058
+
1059
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::ListWorkloadsRequest
1060
+
1061
+ # Converts hash and nil to an options object
1062
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1063
+
1064
+ # Customize the options with defaults
1065
+ call_metadata = @config.rpcs.list_workloads.metadata.to_h
1066
+
1067
+ # Set x-goog-api-client and x-goog-user-project headers
1068
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1069
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1070
+ gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION,
1071
+ transports_version_send: [:rest]
1072
+
1073
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1074
+
1075
+ options.apply_defaults timeout: @config.rpcs.list_workloads.timeout,
1076
+ metadata: call_metadata,
1077
+ retry_policy: @config.rpcs.list_workloads.retry_policy
1078
+
1079
+ options.apply_defaults timeout: @config.timeout,
1080
+ metadata: @config.metadata,
1081
+ retry_policy: @config.retry_policy
1082
+
1083
+ @environments_stub.list_workloads request, options do |result, operation|
1084
+ result = ::Gapic::Rest::PagedEnumerable.new @environments_stub, :list_workloads, "workloads", request, result, options
1085
+ yield result, operation if block_given?
1086
+ return result
1087
+ end
1088
+ rescue ::Gapic::Rest::Error => e
1089
+ raise ::Google::Cloud::Error.from_error(e)
1090
+ end
1091
+
1092
+ ##
1093
+ # Creates a user workloads Secret.
1094
+ #
1095
+ # This method is supported for Cloud Composer environments in versions
1096
+ # composer-3.*.*-airflow-*.*.* and newer.
1097
+ #
1098
+ # @overload create_user_workloads_secret(request, options = nil)
1099
+ # Pass arguments to `create_user_workloads_secret` via a request object, either of type
1100
+ # {::Google::Cloud::Orchestration::Airflow::Service::V1::CreateUserWorkloadsSecretRequest} or an equivalent Hash.
1101
+ #
1102
+ # @param request [::Google::Cloud::Orchestration::Airflow::Service::V1::CreateUserWorkloadsSecretRequest, ::Hash]
1103
+ # A request object representing the call parameters. Required. To specify no
1104
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1105
+ # @param options [::Gapic::CallOptions, ::Hash]
1106
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1107
+ #
1108
+ # @overload create_user_workloads_secret(parent: nil, user_workloads_secret: nil)
1109
+ # Pass arguments to `create_user_workloads_secret` via keyword arguments. Note that at
1110
+ # least one keyword argument is required. To specify no parameters, or to keep all
1111
+ # the default parameter values, pass an empty Hash as a request object (see above).
1112
+ #
1113
+ # @param parent [::String]
1114
+ # Required. The environment name to create a Secret for, in the form:
1115
+ # "projects/\\{projectId}/locations/\\{locationId}/environments/\\{environmentId}"
1116
+ # @param user_workloads_secret [::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsSecret, ::Hash]
1117
+ # Required. User workloads Secret to create.
1118
+ # @yield [result, operation] Access the result along with the TransportOperation object
1119
+ # @yieldparam result [::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsSecret]
1120
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1121
+ #
1122
+ # @return [::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsSecret]
1123
+ #
1124
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1125
+ #
1126
+ # @example Basic example
1127
+ # require "google/cloud/orchestration/airflow/service/v1"
1128
+ #
1129
+ # # Create a client object. The client can be reused for multiple calls.
1130
+ # client = Google::Cloud::Orchestration::Airflow::Service::V1::Environments::Rest::Client.new
1131
+ #
1132
+ # # Create a request. To set request fields, pass in keyword arguments.
1133
+ # request = Google::Cloud::Orchestration::Airflow::Service::V1::CreateUserWorkloadsSecretRequest.new
1134
+ #
1135
+ # # Call the create_user_workloads_secret method.
1136
+ # result = client.create_user_workloads_secret request
1137
+ #
1138
+ # # The returned object is of type Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsSecret.
1139
+ # p result
1140
+ #
1141
+ def create_user_workloads_secret request, options = nil
1142
+ raise ::ArgumentError, "request must be provided" if request.nil?
1143
+
1144
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::CreateUserWorkloadsSecretRequest
1145
+
1146
+ # Converts hash and nil to an options object
1147
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1148
+
1149
+ # Customize the options with defaults
1150
+ call_metadata = @config.rpcs.create_user_workloads_secret.metadata.to_h
1151
+
1152
+ # Set x-goog-api-client and x-goog-user-project headers
1153
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1154
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1155
+ gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION,
1156
+ transports_version_send: [:rest]
1157
+
1158
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1159
+
1160
+ options.apply_defaults timeout: @config.rpcs.create_user_workloads_secret.timeout,
1161
+ metadata: call_metadata,
1162
+ retry_policy: @config.rpcs.create_user_workloads_secret.retry_policy
1163
+
1164
+ options.apply_defaults timeout: @config.timeout,
1165
+ metadata: @config.metadata,
1166
+ retry_policy: @config.retry_policy
1167
+
1168
+ @environments_stub.create_user_workloads_secret request, options do |result, operation|
1169
+ yield result, operation if block_given?
1170
+ return result
1171
+ end
1172
+ rescue ::Gapic::Rest::Error => e
1173
+ raise ::Google::Cloud::Error.from_error(e)
1174
+ end
1175
+
1176
+ ##
1177
+ # Gets an existing user workloads Secret.
1178
+ # Values of the "data" field in the response are cleared.
1179
+ #
1180
+ # This method is supported for Cloud Composer environments in versions
1181
+ # composer-3.*.*-airflow-*.*.* and newer.
1182
+ #
1183
+ # @overload get_user_workloads_secret(request, options = nil)
1184
+ # Pass arguments to `get_user_workloads_secret` via a request object, either of type
1185
+ # {::Google::Cloud::Orchestration::Airflow::Service::V1::GetUserWorkloadsSecretRequest} or an equivalent Hash.
1186
+ #
1187
+ # @param request [::Google::Cloud::Orchestration::Airflow::Service::V1::GetUserWorkloadsSecretRequest, ::Hash]
1188
+ # A request object representing the call parameters. Required. To specify no
1189
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1190
+ # @param options [::Gapic::CallOptions, ::Hash]
1191
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1192
+ #
1193
+ # @overload get_user_workloads_secret(name: nil)
1194
+ # Pass arguments to `get_user_workloads_secret` via keyword arguments. Note that at
1195
+ # least one keyword argument is required. To specify no parameters, or to keep all
1196
+ # the default parameter values, pass an empty Hash as a request object (see above).
1197
+ #
1198
+ # @param name [::String]
1199
+ # Required. The resource name of the Secret to get, in the form:
1200
+ # "projects/\\{projectId}/locations/\\{locationId}/environments/\\{environmentId}/userWorkloadsSecrets/\\{userWorkloadsSecretId}"
1201
+ # @yield [result, operation] Access the result along with the TransportOperation object
1202
+ # @yieldparam result [::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsSecret]
1203
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1204
+ #
1205
+ # @return [::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsSecret]
1206
+ #
1207
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1208
+ #
1209
+ # @example Basic example
1210
+ # require "google/cloud/orchestration/airflow/service/v1"
1211
+ #
1212
+ # # Create a client object. The client can be reused for multiple calls.
1213
+ # client = Google::Cloud::Orchestration::Airflow::Service::V1::Environments::Rest::Client.new
1214
+ #
1215
+ # # Create a request. To set request fields, pass in keyword arguments.
1216
+ # request = Google::Cloud::Orchestration::Airflow::Service::V1::GetUserWorkloadsSecretRequest.new
1217
+ #
1218
+ # # Call the get_user_workloads_secret method.
1219
+ # result = client.get_user_workloads_secret request
1220
+ #
1221
+ # # The returned object is of type Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsSecret.
1222
+ # p result
1223
+ #
1224
+ def get_user_workloads_secret request, options = nil
1225
+ raise ::ArgumentError, "request must be provided" if request.nil?
1226
+
1227
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::GetUserWorkloadsSecretRequest
1228
+
1229
+ # Converts hash and nil to an options object
1230
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1231
+
1232
+ # Customize the options with defaults
1233
+ call_metadata = @config.rpcs.get_user_workloads_secret.metadata.to_h
1234
+
1235
+ # Set x-goog-api-client and x-goog-user-project headers
1236
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1237
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1238
+ gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION,
1239
+ transports_version_send: [:rest]
1240
+
1241
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1242
+
1243
+ options.apply_defaults timeout: @config.rpcs.get_user_workloads_secret.timeout,
1244
+ metadata: call_metadata,
1245
+ retry_policy: @config.rpcs.get_user_workloads_secret.retry_policy
1246
+
1247
+ options.apply_defaults timeout: @config.timeout,
1248
+ metadata: @config.metadata,
1249
+ retry_policy: @config.retry_policy
1250
+
1251
+ @environments_stub.get_user_workloads_secret request, options do |result, operation|
1252
+ yield result, operation if block_given?
1253
+ return result
1254
+ end
1255
+ rescue ::Gapic::Rest::Error => e
1256
+ raise ::Google::Cloud::Error.from_error(e)
1257
+ end
1258
+
1259
+ ##
1260
+ # Lists user workloads Secrets.
1261
+ #
1262
+ # This method is supported for Cloud Composer environments in versions
1263
+ # composer-3.*.*-airflow-*.*.* and newer.
1264
+ #
1265
+ # @overload list_user_workloads_secrets(request, options = nil)
1266
+ # Pass arguments to `list_user_workloads_secrets` via a request object, either of type
1267
+ # {::Google::Cloud::Orchestration::Airflow::Service::V1::ListUserWorkloadsSecretsRequest} or an equivalent Hash.
1268
+ #
1269
+ # @param request [::Google::Cloud::Orchestration::Airflow::Service::V1::ListUserWorkloadsSecretsRequest, ::Hash]
1270
+ # A request object representing the call parameters. Required. To specify no
1271
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1272
+ # @param options [::Gapic::CallOptions, ::Hash]
1273
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1274
+ #
1275
+ # @overload list_user_workloads_secrets(parent: nil, page_size: nil, page_token: nil)
1276
+ # Pass arguments to `list_user_workloads_secrets` via keyword arguments. Note that at
1277
+ # least one keyword argument is required. To specify no parameters, or to keep all
1278
+ # the default parameter values, pass an empty Hash as a request object (see above).
1279
+ #
1280
+ # @param parent [::String]
1281
+ # Required. List Secrets in the given environment, in the form:
1282
+ # "projects/\\{projectId}/locations/\\{locationId}/environments/\\{environmentId}"
1283
+ # @param page_size [::Integer]
1284
+ # Optional. The maximum number of Secrets to return.
1285
+ # @param page_token [::String]
1286
+ # Optional. The next_page_token value returned from a previous List request,
1287
+ # if any.
1288
+ # @yield [result, operation] Access the result along with the TransportOperation object
1289
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsSecret>]
1290
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1291
+ #
1292
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsSecret>]
1293
+ #
1294
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1295
+ #
1296
+ # @example Basic example
1297
+ # require "google/cloud/orchestration/airflow/service/v1"
1298
+ #
1299
+ # # Create a client object. The client can be reused for multiple calls.
1300
+ # client = Google::Cloud::Orchestration::Airflow::Service::V1::Environments::Rest::Client.new
1301
+ #
1302
+ # # Create a request. To set request fields, pass in keyword arguments.
1303
+ # request = Google::Cloud::Orchestration::Airflow::Service::V1::ListUserWorkloadsSecretsRequest.new
1304
+ #
1305
+ # # Call the list_user_workloads_secrets method.
1306
+ # result = client.list_user_workloads_secrets request
1307
+ #
1308
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1309
+ # # over elements, and API calls will be issued to fetch pages as needed.
1310
+ # result.each do |item|
1311
+ # # Each element is of type ::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsSecret.
1312
+ # p item
1313
+ # end
1314
+ #
1315
+ def list_user_workloads_secrets request, options = nil
1316
+ raise ::ArgumentError, "request must be provided" if request.nil?
1317
+
1318
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::ListUserWorkloadsSecretsRequest
1319
+
1320
+ # Converts hash and nil to an options object
1321
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1322
+
1323
+ # Customize the options with defaults
1324
+ call_metadata = @config.rpcs.list_user_workloads_secrets.metadata.to_h
1325
+
1326
+ # Set x-goog-api-client and x-goog-user-project headers
1327
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1328
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1329
+ gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION,
1330
+ transports_version_send: [:rest]
1331
+
1332
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1333
+
1334
+ options.apply_defaults timeout: @config.rpcs.list_user_workloads_secrets.timeout,
1335
+ metadata: call_metadata,
1336
+ retry_policy: @config.rpcs.list_user_workloads_secrets.retry_policy
1337
+
1338
+ options.apply_defaults timeout: @config.timeout,
1339
+ metadata: @config.metadata,
1340
+ retry_policy: @config.retry_policy
1341
+
1342
+ @environments_stub.list_user_workloads_secrets request, options do |result, operation|
1343
+ result = ::Gapic::Rest::PagedEnumerable.new @environments_stub, :list_user_workloads_secrets, "user_workloads_secrets", request, result, options
1344
+ yield result, operation if block_given?
1345
+ return result
1346
+ end
1347
+ rescue ::Gapic::Rest::Error => e
1348
+ raise ::Google::Cloud::Error.from_error(e)
1349
+ end
1350
+
1351
+ ##
1352
+ # Updates a user workloads Secret.
1353
+ #
1354
+ # This method is supported for Cloud Composer environments in versions
1355
+ # composer-3.*.*-airflow-*.*.* and newer.
1356
+ #
1357
+ # @overload update_user_workloads_secret(request, options = nil)
1358
+ # Pass arguments to `update_user_workloads_secret` via a request object, either of type
1359
+ # {::Google::Cloud::Orchestration::Airflow::Service::V1::UpdateUserWorkloadsSecretRequest} or an equivalent Hash.
1360
+ #
1361
+ # @param request [::Google::Cloud::Orchestration::Airflow::Service::V1::UpdateUserWorkloadsSecretRequest, ::Hash]
1362
+ # A request object representing the call parameters. Required. To specify no
1363
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1364
+ # @param options [::Gapic::CallOptions, ::Hash]
1365
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1366
+ #
1367
+ # @overload update_user_workloads_secret(user_workloads_secret: nil)
1368
+ # Pass arguments to `update_user_workloads_secret` via keyword arguments. Note that at
1369
+ # least one keyword argument is required. To specify no parameters, or to keep all
1370
+ # the default parameter values, pass an empty Hash as a request object (see above).
1371
+ #
1372
+ # @param user_workloads_secret [::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsSecret, ::Hash]
1373
+ # Optional. User workloads Secret to override.
1374
+ # @yield [result, operation] Access the result along with the TransportOperation object
1375
+ # @yieldparam result [::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsSecret]
1376
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1377
+ #
1378
+ # @return [::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsSecret]
1379
+ #
1380
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1381
+ #
1382
+ # @example Basic example
1383
+ # require "google/cloud/orchestration/airflow/service/v1"
1384
+ #
1385
+ # # Create a client object. The client can be reused for multiple calls.
1386
+ # client = Google::Cloud::Orchestration::Airflow::Service::V1::Environments::Rest::Client.new
1387
+ #
1388
+ # # Create a request. To set request fields, pass in keyword arguments.
1389
+ # request = Google::Cloud::Orchestration::Airflow::Service::V1::UpdateUserWorkloadsSecretRequest.new
1390
+ #
1391
+ # # Call the update_user_workloads_secret method.
1392
+ # result = client.update_user_workloads_secret request
1393
+ #
1394
+ # # The returned object is of type Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsSecret.
1395
+ # p result
1396
+ #
1397
+ def update_user_workloads_secret request, options = nil
1398
+ raise ::ArgumentError, "request must be provided" if request.nil?
1399
+
1400
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::UpdateUserWorkloadsSecretRequest
1401
+
1402
+ # Converts hash and nil to an options object
1403
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1404
+
1405
+ # Customize the options with defaults
1406
+ call_metadata = @config.rpcs.update_user_workloads_secret.metadata.to_h
1407
+
1408
+ # Set x-goog-api-client and x-goog-user-project headers
1409
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1410
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1411
+ gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION,
1412
+ transports_version_send: [:rest]
1413
+
1414
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1415
+
1416
+ options.apply_defaults timeout: @config.rpcs.update_user_workloads_secret.timeout,
1417
+ metadata: call_metadata,
1418
+ retry_policy: @config.rpcs.update_user_workloads_secret.retry_policy
1419
+
1420
+ options.apply_defaults timeout: @config.timeout,
1421
+ metadata: @config.metadata,
1422
+ retry_policy: @config.retry_policy
1423
+
1424
+ @environments_stub.update_user_workloads_secret request, options do |result, operation|
1425
+ yield result, operation if block_given?
1426
+ return result
1427
+ end
1428
+ rescue ::Gapic::Rest::Error => e
1429
+ raise ::Google::Cloud::Error.from_error(e)
1430
+ end
1431
+
1432
+ ##
1433
+ # Deletes a user workloads Secret.
1434
+ #
1435
+ # This method is supported for Cloud Composer environments in versions
1436
+ # composer-3.*.*-airflow-*.*.* and newer.
1437
+ #
1438
+ # @overload delete_user_workloads_secret(request, options = nil)
1439
+ # Pass arguments to `delete_user_workloads_secret` via a request object, either of type
1440
+ # {::Google::Cloud::Orchestration::Airflow::Service::V1::DeleteUserWorkloadsSecretRequest} or an equivalent Hash.
1441
+ #
1442
+ # @param request [::Google::Cloud::Orchestration::Airflow::Service::V1::DeleteUserWorkloadsSecretRequest, ::Hash]
1443
+ # A request object representing the call parameters. Required. To specify no
1444
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1445
+ # @param options [::Gapic::CallOptions, ::Hash]
1446
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1447
+ #
1448
+ # @overload delete_user_workloads_secret(name: nil)
1449
+ # Pass arguments to `delete_user_workloads_secret` via keyword arguments. Note that at
1450
+ # least one keyword argument is required. To specify no parameters, or to keep all
1451
+ # the default parameter values, pass an empty Hash as a request object (see above).
1452
+ #
1453
+ # @param name [::String]
1454
+ # Required. The Secret to delete, in the form:
1455
+ # "projects/\\{projectId}/locations/\\{locationId}/environments/\\{environmentId}/userWorkloadsSecrets/\\{userWorkloadsSecretId}"
1456
+ # @yield [result, operation] Access the result along with the TransportOperation object
1457
+ # @yieldparam result [::Google::Protobuf::Empty]
1458
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1459
+ #
1460
+ # @return [::Google::Protobuf::Empty]
1461
+ #
1462
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1463
+ #
1464
+ # @example Basic example
1465
+ # require "google/cloud/orchestration/airflow/service/v1"
1466
+ #
1467
+ # # Create a client object. The client can be reused for multiple calls.
1468
+ # client = Google::Cloud::Orchestration::Airflow::Service::V1::Environments::Rest::Client.new
1469
+ #
1470
+ # # Create a request. To set request fields, pass in keyword arguments.
1471
+ # request = Google::Cloud::Orchestration::Airflow::Service::V1::DeleteUserWorkloadsSecretRequest.new
1472
+ #
1473
+ # # Call the delete_user_workloads_secret method.
1474
+ # result = client.delete_user_workloads_secret request
1475
+ #
1476
+ # # The returned object is of type Google::Protobuf::Empty.
1477
+ # p result
1478
+ #
1479
+ def delete_user_workloads_secret request, options = nil
1480
+ raise ::ArgumentError, "request must be provided" if request.nil?
1481
+
1482
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::DeleteUserWorkloadsSecretRequest
1483
+
1484
+ # Converts hash and nil to an options object
1485
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1486
+
1487
+ # Customize the options with defaults
1488
+ call_metadata = @config.rpcs.delete_user_workloads_secret.metadata.to_h
1489
+
1490
+ # Set x-goog-api-client and x-goog-user-project headers
1491
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1492
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1493
+ gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION,
1494
+ transports_version_send: [:rest]
1495
+
1496
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1497
+
1498
+ options.apply_defaults timeout: @config.rpcs.delete_user_workloads_secret.timeout,
1499
+ metadata: call_metadata,
1500
+ retry_policy: @config.rpcs.delete_user_workloads_secret.retry_policy
1501
+
1502
+ options.apply_defaults timeout: @config.timeout,
1503
+ metadata: @config.metadata,
1504
+ retry_policy: @config.retry_policy
1505
+
1506
+ @environments_stub.delete_user_workloads_secret request, options do |result, operation|
1507
+ yield result, operation if block_given?
1508
+ return result
1509
+ end
1510
+ rescue ::Gapic::Rest::Error => e
1511
+ raise ::Google::Cloud::Error.from_error(e)
1512
+ end
1513
+
1514
+ ##
1515
+ # Creates a user workloads ConfigMap.
1516
+ #
1517
+ # This method is supported for Cloud Composer environments in versions
1518
+ # composer-3.*.*-airflow-*.*.* and newer.
1519
+ #
1520
+ # @overload create_user_workloads_config_map(request, options = nil)
1521
+ # Pass arguments to `create_user_workloads_config_map` via a request object, either of type
1522
+ # {::Google::Cloud::Orchestration::Airflow::Service::V1::CreateUserWorkloadsConfigMapRequest} or an equivalent Hash.
1523
+ #
1524
+ # @param request [::Google::Cloud::Orchestration::Airflow::Service::V1::CreateUserWorkloadsConfigMapRequest, ::Hash]
1525
+ # A request object representing the call parameters. Required. To specify no
1526
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1527
+ # @param options [::Gapic::CallOptions, ::Hash]
1528
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1529
+ #
1530
+ # @overload create_user_workloads_config_map(parent: nil, user_workloads_config_map: nil)
1531
+ # Pass arguments to `create_user_workloads_config_map` via keyword arguments. Note that at
1532
+ # least one keyword argument is required. To specify no parameters, or to keep all
1533
+ # the default parameter values, pass an empty Hash as a request object (see above).
1534
+ #
1535
+ # @param parent [::String]
1536
+ # Required. The environment name to create a ConfigMap for, in the form:
1537
+ # "projects/\\{projectId}/locations/\\{locationId}/environments/\\{environmentId}"
1538
+ # @param user_workloads_config_map [::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsConfigMap, ::Hash]
1539
+ # Required. User workloads ConfigMap to create.
1540
+ # @yield [result, operation] Access the result along with the TransportOperation object
1541
+ # @yieldparam result [::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsConfigMap]
1542
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1543
+ #
1544
+ # @return [::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsConfigMap]
1545
+ #
1546
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1547
+ #
1548
+ # @example Basic example
1549
+ # require "google/cloud/orchestration/airflow/service/v1"
1550
+ #
1551
+ # # Create a client object. The client can be reused for multiple calls.
1552
+ # client = Google::Cloud::Orchestration::Airflow::Service::V1::Environments::Rest::Client.new
1553
+ #
1554
+ # # Create a request. To set request fields, pass in keyword arguments.
1555
+ # request = Google::Cloud::Orchestration::Airflow::Service::V1::CreateUserWorkloadsConfigMapRequest.new
1556
+ #
1557
+ # # Call the create_user_workloads_config_map method.
1558
+ # result = client.create_user_workloads_config_map request
1559
+ #
1560
+ # # The returned object is of type Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsConfigMap.
1561
+ # p result
1562
+ #
1563
+ def create_user_workloads_config_map request, options = nil
1564
+ raise ::ArgumentError, "request must be provided" if request.nil?
1565
+
1566
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::CreateUserWorkloadsConfigMapRequest
1567
+
1568
+ # Converts hash and nil to an options object
1569
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1570
+
1571
+ # Customize the options with defaults
1572
+ call_metadata = @config.rpcs.create_user_workloads_config_map.metadata.to_h
1573
+
1574
+ # Set x-goog-api-client and x-goog-user-project headers
1575
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1576
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1577
+ gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION,
1578
+ transports_version_send: [:rest]
1579
+
1580
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1581
+
1582
+ options.apply_defaults timeout: @config.rpcs.create_user_workloads_config_map.timeout,
1583
+ metadata: call_metadata,
1584
+ retry_policy: @config.rpcs.create_user_workloads_config_map.retry_policy
1585
+
1586
+ options.apply_defaults timeout: @config.timeout,
1587
+ metadata: @config.metadata,
1588
+ retry_policy: @config.retry_policy
1589
+
1590
+ @environments_stub.create_user_workloads_config_map request, options do |result, operation|
1591
+ yield result, operation if block_given?
1592
+ return result
1593
+ end
1594
+ rescue ::Gapic::Rest::Error => e
1595
+ raise ::Google::Cloud::Error.from_error(e)
1596
+ end
1597
+
1598
+ ##
1599
+ # Gets an existing user workloads ConfigMap.
1600
+ #
1601
+ # This method is supported for Cloud Composer environments in versions
1602
+ # composer-3.*.*-airflow-*.*.* and newer.
1603
+ #
1604
+ # @overload get_user_workloads_config_map(request, options = nil)
1605
+ # Pass arguments to `get_user_workloads_config_map` via a request object, either of type
1606
+ # {::Google::Cloud::Orchestration::Airflow::Service::V1::GetUserWorkloadsConfigMapRequest} or an equivalent Hash.
1607
+ #
1608
+ # @param request [::Google::Cloud::Orchestration::Airflow::Service::V1::GetUserWorkloadsConfigMapRequest, ::Hash]
1609
+ # A request object representing the call parameters. Required. To specify no
1610
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1611
+ # @param options [::Gapic::CallOptions, ::Hash]
1612
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1613
+ #
1614
+ # @overload get_user_workloads_config_map(name: nil)
1615
+ # Pass arguments to `get_user_workloads_config_map` via keyword arguments. Note that at
1616
+ # least one keyword argument is required. To specify no parameters, or to keep all
1617
+ # the default parameter values, pass an empty Hash as a request object (see above).
1618
+ #
1619
+ # @param name [::String]
1620
+ # Required. The resource name of the ConfigMap to get, in the form:
1621
+ # "projects/\\{projectId}/locations/\\{locationId}/environments/\\{environmentId}/userWorkloadsConfigMaps/\\{userWorkloadsConfigMapId}"
1622
+ # @yield [result, operation] Access the result along with the TransportOperation object
1623
+ # @yieldparam result [::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsConfigMap]
1624
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1625
+ #
1626
+ # @return [::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsConfigMap]
1627
+ #
1628
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1629
+ #
1630
+ # @example Basic example
1631
+ # require "google/cloud/orchestration/airflow/service/v1"
1632
+ #
1633
+ # # Create a client object. The client can be reused for multiple calls.
1634
+ # client = Google::Cloud::Orchestration::Airflow::Service::V1::Environments::Rest::Client.new
1635
+ #
1636
+ # # Create a request. To set request fields, pass in keyword arguments.
1637
+ # request = Google::Cloud::Orchestration::Airflow::Service::V1::GetUserWorkloadsConfigMapRequest.new
1638
+ #
1639
+ # # Call the get_user_workloads_config_map method.
1640
+ # result = client.get_user_workloads_config_map request
1641
+ #
1642
+ # # The returned object is of type Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsConfigMap.
1643
+ # p result
1644
+ #
1645
+ def get_user_workloads_config_map request, options = nil
1646
+ raise ::ArgumentError, "request must be provided" if request.nil?
1647
+
1648
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::GetUserWorkloadsConfigMapRequest
1649
+
1650
+ # Converts hash and nil to an options object
1651
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1652
+
1653
+ # Customize the options with defaults
1654
+ call_metadata = @config.rpcs.get_user_workloads_config_map.metadata.to_h
1655
+
1656
+ # Set x-goog-api-client and x-goog-user-project headers
1657
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1658
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1659
+ gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION,
1660
+ transports_version_send: [:rest]
1661
+
1662
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1663
+
1664
+ options.apply_defaults timeout: @config.rpcs.get_user_workloads_config_map.timeout,
1665
+ metadata: call_metadata,
1666
+ retry_policy: @config.rpcs.get_user_workloads_config_map.retry_policy
1667
+
1668
+ options.apply_defaults timeout: @config.timeout,
1669
+ metadata: @config.metadata,
1670
+ retry_policy: @config.retry_policy
1671
+
1672
+ @environments_stub.get_user_workloads_config_map request, options do |result, operation|
1673
+ yield result, operation if block_given?
1674
+ return result
1675
+ end
1676
+ rescue ::Gapic::Rest::Error => e
1677
+ raise ::Google::Cloud::Error.from_error(e)
1678
+ end
1679
+
1680
+ ##
1681
+ # Lists user workloads ConfigMaps.
1682
+ #
1683
+ # This method is supported for Cloud Composer environments in versions
1684
+ # composer-3.*.*-airflow-*.*.* and newer.
1685
+ #
1686
+ # @overload list_user_workloads_config_maps(request, options = nil)
1687
+ # Pass arguments to `list_user_workloads_config_maps` via a request object, either of type
1688
+ # {::Google::Cloud::Orchestration::Airflow::Service::V1::ListUserWorkloadsConfigMapsRequest} or an equivalent Hash.
1689
+ #
1690
+ # @param request [::Google::Cloud::Orchestration::Airflow::Service::V1::ListUserWorkloadsConfigMapsRequest, ::Hash]
1691
+ # A request object representing the call parameters. Required. To specify no
1692
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1693
+ # @param options [::Gapic::CallOptions, ::Hash]
1694
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1695
+ #
1696
+ # @overload list_user_workloads_config_maps(parent: nil, page_size: nil, page_token: nil)
1697
+ # Pass arguments to `list_user_workloads_config_maps` via keyword arguments. Note that at
1698
+ # least one keyword argument is required. To specify no parameters, or to keep all
1699
+ # the default parameter values, pass an empty Hash as a request object (see above).
1700
+ #
1701
+ # @param parent [::String]
1702
+ # Required. List ConfigMaps in the given environment, in the form:
1703
+ # "projects/\\{projectId}/locations/\\{locationId}/environments/\\{environmentId}"
1704
+ # @param page_size [::Integer]
1705
+ # Optional. The maximum number of ConfigMaps to return.
1706
+ # @param page_token [::String]
1707
+ # Optional. The next_page_token value returned from a previous List request,
1708
+ # if any.
1709
+ # @yield [result, operation] Access the result along with the TransportOperation object
1710
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsConfigMap>]
1711
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1712
+ #
1713
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsConfigMap>]
1714
+ #
1715
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1716
+ #
1717
+ # @example Basic example
1718
+ # require "google/cloud/orchestration/airflow/service/v1"
1719
+ #
1720
+ # # Create a client object. The client can be reused for multiple calls.
1721
+ # client = Google::Cloud::Orchestration::Airflow::Service::V1::Environments::Rest::Client.new
1722
+ #
1723
+ # # Create a request. To set request fields, pass in keyword arguments.
1724
+ # request = Google::Cloud::Orchestration::Airflow::Service::V1::ListUserWorkloadsConfigMapsRequest.new
1725
+ #
1726
+ # # Call the list_user_workloads_config_maps method.
1727
+ # result = client.list_user_workloads_config_maps request
1728
+ #
1729
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1730
+ # # over elements, and API calls will be issued to fetch pages as needed.
1731
+ # result.each do |item|
1732
+ # # Each element is of type ::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsConfigMap.
1733
+ # p item
1734
+ # end
1735
+ #
1736
+ def list_user_workloads_config_maps request, options = nil
1737
+ raise ::ArgumentError, "request must be provided" if request.nil?
1738
+
1739
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::ListUserWorkloadsConfigMapsRequest
1740
+
1741
+ # Converts hash and nil to an options object
1742
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1743
+
1744
+ # Customize the options with defaults
1745
+ call_metadata = @config.rpcs.list_user_workloads_config_maps.metadata.to_h
1746
+
1747
+ # Set x-goog-api-client and x-goog-user-project headers
1748
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1749
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1750
+ gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION,
1751
+ transports_version_send: [:rest]
1752
+
1753
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1754
+
1755
+ options.apply_defaults timeout: @config.rpcs.list_user_workloads_config_maps.timeout,
1756
+ metadata: call_metadata,
1757
+ retry_policy: @config.rpcs.list_user_workloads_config_maps.retry_policy
1758
+
1759
+ options.apply_defaults timeout: @config.timeout,
1760
+ metadata: @config.metadata,
1761
+ retry_policy: @config.retry_policy
1762
+
1763
+ @environments_stub.list_user_workloads_config_maps request, options do |result, operation|
1764
+ result = ::Gapic::Rest::PagedEnumerable.new @environments_stub, :list_user_workloads_config_maps, "user_workloads_config_maps", request, result, options
1765
+ yield result, operation if block_given?
1766
+ return result
1767
+ end
1768
+ rescue ::Gapic::Rest::Error => e
1769
+ raise ::Google::Cloud::Error.from_error(e)
1770
+ end
1771
+
1772
+ ##
1773
+ # Updates a user workloads ConfigMap.
1774
+ #
1775
+ # This method is supported for Cloud Composer environments in versions
1776
+ # composer-3.*.*-airflow-*.*.* and newer.
1777
+ #
1778
+ # @overload update_user_workloads_config_map(request, options = nil)
1779
+ # Pass arguments to `update_user_workloads_config_map` via a request object, either of type
1780
+ # {::Google::Cloud::Orchestration::Airflow::Service::V1::UpdateUserWorkloadsConfigMapRequest} or an equivalent Hash.
1781
+ #
1782
+ # @param request [::Google::Cloud::Orchestration::Airflow::Service::V1::UpdateUserWorkloadsConfigMapRequest, ::Hash]
1783
+ # A request object representing the call parameters. Required. To specify no
1784
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1785
+ # @param options [::Gapic::CallOptions, ::Hash]
1786
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1787
+ #
1788
+ # @overload update_user_workloads_config_map(user_workloads_config_map: nil)
1789
+ # Pass arguments to `update_user_workloads_config_map` via keyword arguments. Note that at
1790
+ # least one keyword argument is required. To specify no parameters, or to keep all
1791
+ # the default parameter values, pass an empty Hash as a request object (see above).
1792
+ #
1793
+ # @param user_workloads_config_map [::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsConfigMap, ::Hash]
1794
+ # Optional. User workloads ConfigMap to override.
1795
+ # @yield [result, operation] Access the result along with the TransportOperation object
1796
+ # @yieldparam result [::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsConfigMap]
1797
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1798
+ #
1799
+ # @return [::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsConfigMap]
1800
+ #
1801
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1802
+ #
1803
+ # @example Basic example
1804
+ # require "google/cloud/orchestration/airflow/service/v1"
1805
+ #
1806
+ # # Create a client object. The client can be reused for multiple calls.
1807
+ # client = Google::Cloud::Orchestration::Airflow::Service::V1::Environments::Rest::Client.new
1808
+ #
1809
+ # # Create a request. To set request fields, pass in keyword arguments.
1810
+ # request = Google::Cloud::Orchestration::Airflow::Service::V1::UpdateUserWorkloadsConfigMapRequest.new
1811
+ #
1812
+ # # Call the update_user_workloads_config_map method.
1813
+ # result = client.update_user_workloads_config_map request
1814
+ #
1815
+ # # The returned object is of type Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsConfigMap.
1816
+ # p result
1817
+ #
1818
+ def update_user_workloads_config_map request, options = nil
1819
+ raise ::ArgumentError, "request must be provided" if request.nil?
1820
+
1821
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::UpdateUserWorkloadsConfigMapRequest
1822
+
1823
+ # Converts hash and nil to an options object
1824
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1825
+
1826
+ # Customize the options with defaults
1827
+ call_metadata = @config.rpcs.update_user_workloads_config_map.metadata.to_h
1828
+
1829
+ # Set x-goog-api-client and x-goog-user-project headers
1830
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1831
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1832
+ gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION,
1833
+ transports_version_send: [:rest]
1834
+
1835
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1836
+
1837
+ options.apply_defaults timeout: @config.rpcs.update_user_workloads_config_map.timeout,
1838
+ metadata: call_metadata,
1839
+ retry_policy: @config.rpcs.update_user_workloads_config_map.retry_policy
1840
+
1841
+ options.apply_defaults timeout: @config.timeout,
1842
+ metadata: @config.metadata,
1843
+ retry_policy: @config.retry_policy
1844
+
1845
+ @environments_stub.update_user_workloads_config_map request, options do |result, operation|
1846
+ yield result, operation if block_given?
1847
+ return result
1848
+ end
1849
+ rescue ::Gapic::Rest::Error => e
1850
+ raise ::Google::Cloud::Error.from_error(e)
1851
+ end
1852
+
1853
+ ##
1854
+ # Deletes a user workloads ConfigMap.
1855
+ #
1856
+ # This method is supported for Cloud Composer environments in versions
1857
+ # composer-3.*.*-airflow-*.*.* and newer.
1858
+ #
1859
+ # @overload delete_user_workloads_config_map(request, options = nil)
1860
+ # Pass arguments to `delete_user_workloads_config_map` via a request object, either of type
1861
+ # {::Google::Cloud::Orchestration::Airflow::Service::V1::DeleteUserWorkloadsConfigMapRequest} or an equivalent Hash.
1862
+ #
1863
+ # @param request [::Google::Cloud::Orchestration::Airflow::Service::V1::DeleteUserWorkloadsConfigMapRequest, ::Hash]
1864
+ # A request object representing the call parameters. Required. To specify no
1865
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1866
+ # @param options [::Gapic::CallOptions, ::Hash]
1867
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1868
+ #
1869
+ # @overload delete_user_workloads_config_map(name: nil)
1870
+ # Pass arguments to `delete_user_workloads_config_map` via keyword arguments. Note that at
1871
+ # least one keyword argument is required. To specify no parameters, or to keep all
1872
+ # the default parameter values, pass an empty Hash as a request object (see above).
1873
+ #
1874
+ # @param name [::String]
1875
+ # Required. The ConfigMap to delete, in the form:
1876
+ # "projects/\\{projectId}/locations/\\{locationId}/environments/\\{environmentId}/userWorkloadsConfigMaps/\\{userWorkloadsConfigMapId}"
1877
+ # @yield [result, operation] Access the result along with the TransportOperation object
1878
+ # @yieldparam result [::Google::Protobuf::Empty]
1879
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1880
+ #
1881
+ # @return [::Google::Protobuf::Empty]
1882
+ #
1883
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1884
+ #
1885
+ # @example Basic example
1886
+ # require "google/cloud/orchestration/airflow/service/v1"
1887
+ #
1888
+ # # Create a client object. The client can be reused for multiple calls.
1889
+ # client = Google::Cloud::Orchestration::Airflow::Service::V1::Environments::Rest::Client.new
1890
+ #
1891
+ # # Create a request. To set request fields, pass in keyword arguments.
1892
+ # request = Google::Cloud::Orchestration::Airflow::Service::V1::DeleteUserWorkloadsConfigMapRequest.new
1893
+ #
1894
+ # # Call the delete_user_workloads_config_map method.
1895
+ # result = client.delete_user_workloads_config_map request
1896
+ #
1897
+ # # The returned object is of type Google::Protobuf::Empty.
1898
+ # p result
1899
+ #
1900
+ def delete_user_workloads_config_map request, options = nil
1901
+ raise ::ArgumentError, "request must be provided" if request.nil?
1902
+
1903
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::DeleteUserWorkloadsConfigMapRequest
1904
+
1905
+ # Converts hash and nil to an options object
1906
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1907
+
1908
+ # Customize the options with defaults
1909
+ call_metadata = @config.rpcs.delete_user_workloads_config_map.metadata.to_h
1910
+
1911
+ # Set x-goog-api-client and x-goog-user-project headers
1912
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1913
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1914
+ gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION,
1915
+ transports_version_send: [:rest]
1916
+
1917
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1918
+
1919
+ options.apply_defaults timeout: @config.rpcs.delete_user_workloads_config_map.timeout,
1920
+ metadata: call_metadata,
1921
+ retry_policy: @config.rpcs.delete_user_workloads_config_map.retry_policy
1922
+
1923
+ options.apply_defaults timeout: @config.timeout,
1924
+ metadata: @config.metadata,
1925
+ retry_policy: @config.retry_policy
1926
+
1927
+ @environments_stub.delete_user_workloads_config_map request, options do |result, operation|
1928
+ yield result, operation if block_given?
1929
+ return result
1930
+ end
1931
+ rescue ::Gapic::Rest::Error => e
1932
+ raise ::Google::Cloud::Error.from_error(e)
1933
+ end
1934
+
992
1935
  ##
993
1936
  # Creates a snapshots of a Cloud Composer environment.
994
1937
  #
@@ -1527,6 +2470,61 @@ module Google
1527
2470
  #
1528
2471
  attr_reader :poll_airflow_command
1529
2472
  ##
2473
+ # RPC-specific configuration for `list_workloads`
2474
+ # @return [::Gapic::Config::Method]
2475
+ #
2476
+ attr_reader :list_workloads
2477
+ ##
2478
+ # RPC-specific configuration for `create_user_workloads_secret`
2479
+ # @return [::Gapic::Config::Method]
2480
+ #
2481
+ attr_reader :create_user_workloads_secret
2482
+ ##
2483
+ # RPC-specific configuration for `get_user_workloads_secret`
2484
+ # @return [::Gapic::Config::Method]
2485
+ #
2486
+ attr_reader :get_user_workloads_secret
2487
+ ##
2488
+ # RPC-specific configuration for `list_user_workloads_secrets`
2489
+ # @return [::Gapic::Config::Method]
2490
+ #
2491
+ attr_reader :list_user_workloads_secrets
2492
+ ##
2493
+ # RPC-specific configuration for `update_user_workloads_secret`
2494
+ # @return [::Gapic::Config::Method]
2495
+ #
2496
+ attr_reader :update_user_workloads_secret
2497
+ ##
2498
+ # RPC-specific configuration for `delete_user_workloads_secret`
2499
+ # @return [::Gapic::Config::Method]
2500
+ #
2501
+ attr_reader :delete_user_workloads_secret
2502
+ ##
2503
+ # RPC-specific configuration for `create_user_workloads_config_map`
2504
+ # @return [::Gapic::Config::Method]
2505
+ #
2506
+ attr_reader :create_user_workloads_config_map
2507
+ ##
2508
+ # RPC-specific configuration for `get_user_workloads_config_map`
2509
+ # @return [::Gapic::Config::Method]
2510
+ #
2511
+ attr_reader :get_user_workloads_config_map
2512
+ ##
2513
+ # RPC-specific configuration for `list_user_workloads_config_maps`
2514
+ # @return [::Gapic::Config::Method]
2515
+ #
2516
+ attr_reader :list_user_workloads_config_maps
2517
+ ##
2518
+ # RPC-specific configuration for `update_user_workloads_config_map`
2519
+ # @return [::Gapic::Config::Method]
2520
+ #
2521
+ attr_reader :update_user_workloads_config_map
2522
+ ##
2523
+ # RPC-specific configuration for `delete_user_workloads_config_map`
2524
+ # @return [::Gapic::Config::Method]
2525
+ #
2526
+ attr_reader :delete_user_workloads_config_map
2527
+ ##
1530
2528
  # RPC-specific configuration for `save_snapshot`
1531
2529
  # @return [::Gapic::Config::Method]
1532
2530
  #
@@ -1565,6 +2563,28 @@ module Google
1565
2563
  @stop_airflow_command = ::Gapic::Config::Method.new stop_airflow_command_config
1566
2564
  poll_airflow_command_config = parent_rpcs.poll_airflow_command if parent_rpcs.respond_to? :poll_airflow_command
1567
2565
  @poll_airflow_command = ::Gapic::Config::Method.new poll_airflow_command_config
2566
+ list_workloads_config = parent_rpcs.list_workloads if parent_rpcs.respond_to? :list_workloads
2567
+ @list_workloads = ::Gapic::Config::Method.new list_workloads_config
2568
+ create_user_workloads_secret_config = parent_rpcs.create_user_workloads_secret if parent_rpcs.respond_to? :create_user_workloads_secret
2569
+ @create_user_workloads_secret = ::Gapic::Config::Method.new create_user_workloads_secret_config
2570
+ get_user_workloads_secret_config = parent_rpcs.get_user_workloads_secret if parent_rpcs.respond_to? :get_user_workloads_secret
2571
+ @get_user_workloads_secret = ::Gapic::Config::Method.new get_user_workloads_secret_config
2572
+ list_user_workloads_secrets_config = parent_rpcs.list_user_workloads_secrets if parent_rpcs.respond_to? :list_user_workloads_secrets
2573
+ @list_user_workloads_secrets = ::Gapic::Config::Method.new list_user_workloads_secrets_config
2574
+ update_user_workloads_secret_config = parent_rpcs.update_user_workloads_secret if parent_rpcs.respond_to? :update_user_workloads_secret
2575
+ @update_user_workloads_secret = ::Gapic::Config::Method.new update_user_workloads_secret_config
2576
+ delete_user_workloads_secret_config = parent_rpcs.delete_user_workloads_secret if parent_rpcs.respond_to? :delete_user_workloads_secret
2577
+ @delete_user_workloads_secret = ::Gapic::Config::Method.new delete_user_workloads_secret_config
2578
+ create_user_workloads_config_map_config = parent_rpcs.create_user_workloads_config_map if parent_rpcs.respond_to? :create_user_workloads_config_map
2579
+ @create_user_workloads_config_map = ::Gapic::Config::Method.new create_user_workloads_config_map_config
2580
+ get_user_workloads_config_map_config = parent_rpcs.get_user_workloads_config_map if parent_rpcs.respond_to? :get_user_workloads_config_map
2581
+ @get_user_workloads_config_map = ::Gapic::Config::Method.new get_user_workloads_config_map_config
2582
+ list_user_workloads_config_maps_config = parent_rpcs.list_user_workloads_config_maps if parent_rpcs.respond_to? :list_user_workloads_config_maps
2583
+ @list_user_workloads_config_maps = ::Gapic::Config::Method.new list_user_workloads_config_maps_config
2584
+ update_user_workloads_config_map_config = parent_rpcs.update_user_workloads_config_map if parent_rpcs.respond_to? :update_user_workloads_config_map
2585
+ @update_user_workloads_config_map = ::Gapic::Config::Method.new update_user_workloads_config_map_config
2586
+ delete_user_workloads_config_map_config = parent_rpcs.delete_user_workloads_config_map if parent_rpcs.respond_to? :delete_user_workloads_config_map
2587
+ @delete_user_workloads_config_map = ::Gapic::Config::Method.new delete_user_workloads_config_map_config
1568
2588
  save_snapshot_config = parent_rpcs.save_snapshot if parent_rpcs.respond_to? :save_snapshot
1569
2589
  @save_snapshot = ::Gapic::Config::Method.new save_snapshot_config
1570
2590
  load_snapshot_config = parent_rpcs.load_snapshot if parent_rpcs.respond_to? :load_snapshot