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

Sign up to get free protection for your applications and to get access to all the features.
@@ -1052,6 +1052,1026 @@ module Google
1052
1052
  raise ::Google::Cloud::Error.from_error(e)
1053
1053
  end
1054
1054
 
1055
+ ##
1056
+ # Lists workloads in a Cloud Composer environment. Workload is a unit that
1057
+ # runs a single Composer component.
1058
+ #
1059
+ # This method is supported for Cloud Composer environments in versions
1060
+ # composer-3.*.*-airflow-*.*.* and newer.
1061
+ #
1062
+ # @overload list_workloads(request, options = nil)
1063
+ # Pass arguments to `list_workloads` via a request object, either of type
1064
+ # {::Google::Cloud::Orchestration::Airflow::Service::V1::ListWorkloadsRequest} or an equivalent Hash.
1065
+ #
1066
+ # @param request [::Google::Cloud::Orchestration::Airflow::Service::V1::ListWorkloadsRequest, ::Hash]
1067
+ # A request object representing the call parameters. Required. To specify no
1068
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1069
+ # @param options [::Gapic::CallOptions, ::Hash]
1070
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1071
+ #
1072
+ # @overload list_workloads(parent: nil, page_size: nil, page_token: nil, filter: nil)
1073
+ # Pass arguments to `list_workloads` via keyword arguments. Note that at
1074
+ # least one keyword argument is required. To specify no parameters, or to keep all
1075
+ # the default parameter values, pass an empty Hash as a request object (see above).
1076
+ #
1077
+ # @param parent [::String]
1078
+ # Required. The environment name to get workloads for, in the form:
1079
+ # "projects/\\{projectId}/locations/\\{locationId}/environments/\\{environmentId}"
1080
+ # @param page_size [::Integer]
1081
+ # Optional. The maximum number of environments to return.
1082
+ # @param page_token [::String]
1083
+ # Optional. The next_page_token value returned from a previous List request,
1084
+ # if any.
1085
+ # @param filter [::String]
1086
+ # Optional. The list filter.
1087
+ # Currently only supports equality on the type field. The value of a field
1088
+ # specified in the filter expression must be one ComposerWorkloadType enum
1089
+ # option. It's possible to get multiple types using "OR" operator, e.g.:
1090
+ # "type=SCHEDULER OR type=CELERY_WORKER". If not specified, all items are
1091
+ # returned.
1092
+ #
1093
+ # @yield [response, operation] Access the result along with the RPC operation
1094
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Orchestration::Airflow::Service::V1::ListWorkloadsResponse::ComposerWorkload>]
1095
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1096
+ #
1097
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Orchestration::Airflow::Service::V1::ListWorkloadsResponse::ComposerWorkload>]
1098
+ #
1099
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1100
+ #
1101
+ # @example Basic example
1102
+ # require "google/cloud/orchestration/airflow/service/v1"
1103
+ #
1104
+ # # Create a client object. The client can be reused for multiple calls.
1105
+ # client = Google::Cloud::Orchestration::Airflow::Service::V1::Environments::Client.new
1106
+ #
1107
+ # # Create a request. To set request fields, pass in keyword arguments.
1108
+ # request = Google::Cloud::Orchestration::Airflow::Service::V1::ListWorkloadsRequest.new
1109
+ #
1110
+ # # Call the list_workloads method.
1111
+ # result = client.list_workloads request
1112
+ #
1113
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1114
+ # # over elements, and API calls will be issued to fetch pages as needed.
1115
+ # result.each do |item|
1116
+ # # Each element is of type ::Google::Cloud::Orchestration::Airflow::Service::V1::ListWorkloadsResponse::ComposerWorkload.
1117
+ # p item
1118
+ # end
1119
+ #
1120
+ def list_workloads request, options = nil
1121
+ raise ::ArgumentError, "request must be provided" if request.nil?
1122
+
1123
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::ListWorkloadsRequest
1124
+
1125
+ # Converts hash and nil to an options object
1126
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1127
+
1128
+ # Customize the options with defaults
1129
+ metadata = @config.rpcs.list_workloads.metadata.to_h
1130
+
1131
+ # Set x-goog-api-client and x-goog-user-project headers
1132
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1133
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1134
+ gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION
1135
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1136
+
1137
+ header_params = {}
1138
+ if request.parent
1139
+ header_params["parent"] = request.parent
1140
+ end
1141
+
1142
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1143
+ metadata[:"x-goog-request-params"] ||= request_params_header
1144
+
1145
+ options.apply_defaults timeout: @config.rpcs.list_workloads.timeout,
1146
+ metadata: metadata,
1147
+ retry_policy: @config.rpcs.list_workloads.retry_policy
1148
+
1149
+ options.apply_defaults timeout: @config.timeout,
1150
+ metadata: @config.metadata,
1151
+ retry_policy: @config.retry_policy
1152
+
1153
+ @environments_stub.call_rpc :list_workloads, request, options: options do |response, operation|
1154
+ response = ::Gapic::PagedEnumerable.new @environments_stub, :list_workloads, request, response, operation, options
1155
+ yield response, operation if block_given?
1156
+ return response
1157
+ end
1158
+ rescue ::GRPC::BadStatus => e
1159
+ raise ::Google::Cloud::Error.from_error(e)
1160
+ end
1161
+
1162
+ ##
1163
+ # Creates a user workloads Secret.
1164
+ #
1165
+ # This method is supported for Cloud Composer environments in versions
1166
+ # composer-3.*.*-airflow-*.*.* and newer.
1167
+ #
1168
+ # @overload create_user_workloads_secret(request, options = nil)
1169
+ # Pass arguments to `create_user_workloads_secret` via a request object, either of type
1170
+ # {::Google::Cloud::Orchestration::Airflow::Service::V1::CreateUserWorkloadsSecretRequest} or an equivalent Hash.
1171
+ #
1172
+ # @param request [::Google::Cloud::Orchestration::Airflow::Service::V1::CreateUserWorkloadsSecretRequest, ::Hash]
1173
+ # A request object representing the call parameters. Required. To specify no
1174
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1175
+ # @param options [::Gapic::CallOptions, ::Hash]
1176
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1177
+ #
1178
+ # @overload create_user_workloads_secret(parent: nil, user_workloads_secret: nil)
1179
+ # Pass arguments to `create_user_workloads_secret` via keyword arguments. Note that at
1180
+ # least one keyword argument is required. To specify no parameters, or to keep all
1181
+ # the default parameter values, pass an empty Hash as a request object (see above).
1182
+ #
1183
+ # @param parent [::String]
1184
+ # Required. The environment name to create a Secret for, in the form:
1185
+ # "projects/\\{projectId}/locations/\\{locationId}/environments/\\{environmentId}"
1186
+ # @param user_workloads_secret [::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsSecret, ::Hash]
1187
+ # Required. User workloads Secret to create.
1188
+ #
1189
+ # @yield [response, operation] Access the result along with the RPC operation
1190
+ # @yieldparam response [::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsSecret]
1191
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1192
+ #
1193
+ # @return [::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsSecret]
1194
+ #
1195
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1196
+ #
1197
+ # @example Basic example
1198
+ # require "google/cloud/orchestration/airflow/service/v1"
1199
+ #
1200
+ # # Create a client object. The client can be reused for multiple calls.
1201
+ # client = Google::Cloud::Orchestration::Airflow::Service::V1::Environments::Client.new
1202
+ #
1203
+ # # Create a request. To set request fields, pass in keyword arguments.
1204
+ # request = Google::Cloud::Orchestration::Airflow::Service::V1::CreateUserWorkloadsSecretRequest.new
1205
+ #
1206
+ # # Call the create_user_workloads_secret method.
1207
+ # result = client.create_user_workloads_secret request
1208
+ #
1209
+ # # The returned object is of type Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsSecret.
1210
+ # p result
1211
+ #
1212
+ def create_user_workloads_secret request, options = nil
1213
+ raise ::ArgumentError, "request must be provided" if request.nil?
1214
+
1215
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::CreateUserWorkloadsSecretRequest
1216
+
1217
+ # Converts hash and nil to an options object
1218
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1219
+
1220
+ # Customize the options with defaults
1221
+ metadata = @config.rpcs.create_user_workloads_secret.metadata.to_h
1222
+
1223
+ # Set x-goog-api-client and x-goog-user-project headers
1224
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1225
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1226
+ gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION
1227
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1228
+
1229
+ header_params = {}
1230
+ if request.parent
1231
+ header_params["parent"] = request.parent
1232
+ end
1233
+
1234
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1235
+ metadata[:"x-goog-request-params"] ||= request_params_header
1236
+
1237
+ options.apply_defaults timeout: @config.rpcs.create_user_workloads_secret.timeout,
1238
+ metadata: metadata,
1239
+ retry_policy: @config.rpcs.create_user_workloads_secret.retry_policy
1240
+
1241
+ options.apply_defaults timeout: @config.timeout,
1242
+ metadata: @config.metadata,
1243
+ retry_policy: @config.retry_policy
1244
+
1245
+ @environments_stub.call_rpc :create_user_workloads_secret, request, options: options do |response, operation|
1246
+ yield response, operation if block_given?
1247
+ return response
1248
+ end
1249
+ rescue ::GRPC::BadStatus => e
1250
+ raise ::Google::Cloud::Error.from_error(e)
1251
+ end
1252
+
1253
+ ##
1254
+ # Gets an existing user workloads Secret.
1255
+ # Values of the "data" field in the response are cleared.
1256
+ #
1257
+ # This method is supported for Cloud Composer environments in versions
1258
+ # composer-3.*.*-airflow-*.*.* and newer.
1259
+ #
1260
+ # @overload get_user_workloads_secret(request, options = nil)
1261
+ # Pass arguments to `get_user_workloads_secret` via a request object, either of type
1262
+ # {::Google::Cloud::Orchestration::Airflow::Service::V1::GetUserWorkloadsSecretRequest} or an equivalent Hash.
1263
+ #
1264
+ # @param request [::Google::Cloud::Orchestration::Airflow::Service::V1::GetUserWorkloadsSecretRequest, ::Hash]
1265
+ # A request object representing the call parameters. Required. To specify no
1266
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1267
+ # @param options [::Gapic::CallOptions, ::Hash]
1268
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1269
+ #
1270
+ # @overload get_user_workloads_secret(name: nil)
1271
+ # Pass arguments to `get_user_workloads_secret` via keyword arguments. Note that at
1272
+ # least one keyword argument is required. To specify no parameters, or to keep all
1273
+ # the default parameter values, pass an empty Hash as a request object (see above).
1274
+ #
1275
+ # @param name [::String]
1276
+ # Required. The resource name of the Secret to get, in the form:
1277
+ # "projects/\\{projectId}/locations/\\{locationId}/environments/\\{environmentId}/userWorkloadsSecrets/\\{userWorkloadsSecretId}"
1278
+ #
1279
+ # @yield [response, operation] Access the result along with the RPC operation
1280
+ # @yieldparam response [::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsSecret]
1281
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1282
+ #
1283
+ # @return [::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsSecret]
1284
+ #
1285
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1286
+ #
1287
+ # @example Basic example
1288
+ # require "google/cloud/orchestration/airflow/service/v1"
1289
+ #
1290
+ # # Create a client object. The client can be reused for multiple calls.
1291
+ # client = Google::Cloud::Orchestration::Airflow::Service::V1::Environments::Client.new
1292
+ #
1293
+ # # Create a request. To set request fields, pass in keyword arguments.
1294
+ # request = Google::Cloud::Orchestration::Airflow::Service::V1::GetUserWorkloadsSecretRequest.new
1295
+ #
1296
+ # # Call the get_user_workloads_secret method.
1297
+ # result = client.get_user_workloads_secret request
1298
+ #
1299
+ # # The returned object is of type Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsSecret.
1300
+ # p result
1301
+ #
1302
+ def get_user_workloads_secret request, options = nil
1303
+ raise ::ArgumentError, "request must be provided" if request.nil?
1304
+
1305
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::GetUserWorkloadsSecretRequest
1306
+
1307
+ # Converts hash and nil to an options object
1308
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1309
+
1310
+ # Customize the options with defaults
1311
+ metadata = @config.rpcs.get_user_workloads_secret.metadata.to_h
1312
+
1313
+ # Set x-goog-api-client and x-goog-user-project headers
1314
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1315
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1316
+ gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION
1317
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1318
+
1319
+ header_params = {}
1320
+ if request.name
1321
+ header_params["name"] = request.name
1322
+ end
1323
+
1324
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1325
+ metadata[:"x-goog-request-params"] ||= request_params_header
1326
+
1327
+ options.apply_defaults timeout: @config.rpcs.get_user_workloads_secret.timeout,
1328
+ metadata: metadata,
1329
+ retry_policy: @config.rpcs.get_user_workloads_secret.retry_policy
1330
+
1331
+ options.apply_defaults timeout: @config.timeout,
1332
+ metadata: @config.metadata,
1333
+ retry_policy: @config.retry_policy
1334
+
1335
+ @environments_stub.call_rpc :get_user_workloads_secret, request, options: options do |response, operation|
1336
+ yield response, operation if block_given?
1337
+ return response
1338
+ end
1339
+ rescue ::GRPC::BadStatus => e
1340
+ raise ::Google::Cloud::Error.from_error(e)
1341
+ end
1342
+
1343
+ ##
1344
+ # Lists user workloads Secrets.
1345
+ #
1346
+ # This method is supported for Cloud Composer environments in versions
1347
+ # composer-3.*.*-airflow-*.*.* and newer.
1348
+ #
1349
+ # @overload list_user_workloads_secrets(request, options = nil)
1350
+ # Pass arguments to `list_user_workloads_secrets` via a request object, either of type
1351
+ # {::Google::Cloud::Orchestration::Airflow::Service::V1::ListUserWorkloadsSecretsRequest} or an equivalent Hash.
1352
+ #
1353
+ # @param request [::Google::Cloud::Orchestration::Airflow::Service::V1::ListUserWorkloadsSecretsRequest, ::Hash]
1354
+ # A request object representing the call parameters. Required. To specify no
1355
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1356
+ # @param options [::Gapic::CallOptions, ::Hash]
1357
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1358
+ #
1359
+ # @overload list_user_workloads_secrets(parent: nil, page_size: nil, page_token: nil)
1360
+ # Pass arguments to `list_user_workloads_secrets` via keyword arguments. Note that at
1361
+ # least one keyword argument is required. To specify no parameters, or to keep all
1362
+ # the default parameter values, pass an empty Hash as a request object (see above).
1363
+ #
1364
+ # @param parent [::String]
1365
+ # Required. List Secrets in the given environment, in the form:
1366
+ # "projects/\\{projectId}/locations/\\{locationId}/environments/\\{environmentId}"
1367
+ # @param page_size [::Integer]
1368
+ # Optional. The maximum number of Secrets to return.
1369
+ # @param page_token [::String]
1370
+ # Optional. The next_page_token value returned from a previous List request,
1371
+ # if any.
1372
+ #
1373
+ # @yield [response, operation] Access the result along with the RPC operation
1374
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsSecret>]
1375
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1376
+ #
1377
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsSecret>]
1378
+ #
1379
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1380
+ #
1381
+ # @example Basic example
1382
+ # require "google/cloud/orchestration/airflow/service/v1"
1383
+ #
1384
+ # # Create a client object. The client can be reused for multiple calls.
1385
+ # client = Google::Cloud::Orchestration::Airflow::Service::V1::Environments::Client.new
1386
+ #
1387
+ # # Create a request. To set request fields, pass in keyword arguments.
1388
+ # request = Google::Cloud::Orchestration::Airflow::Service::V1::ListUserWorkloadsSecretsRequest.new
1389
+ #
1390
+ # # Call the list_user_workloads_secrets method.
1391
+ # result = client.list_user_workloads_secrets request
1392
+ #
1393
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1394
+ # # over elements, and API calls will be issued to fetch pages as needed.
1395
+ # result.each do |item|
1396
+ # # Each element is of type ::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsSecret.
1397
+ # p item
1398
+ # end
1399
+ #
1400
+ def list_user_workloads_secrets request, options = nil
1401
+ raise ::ArgumentError, "request must be provided" if request.nil?
1402
+
1403
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::ListUserWorkloadsSecretsRequest
1404
+
1405
+ # Converts hash and nil to an options object
1406
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1407
+
1408
+ # Customize the options with defaults
1409
+ metadata = @config.rpcs.list_user_workloads_secrets.metadata.to_h
1410
+
1411
+ # Set x-goog-api-client and x-goog-user-project headers
1412
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1413
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1414
+ gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION
1415
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1416
+
1417
+ header_params = {}
1418
+ if request.parent
1419
+ header_params["parent"] = request.parent
1420
+ end
1421
+
1422
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1423
+ metadata[:"x-goog-request-params"] ||= request_params_header
1424
+
1425
+ options.apply_defaults timeout: @config.rpcs.list_user_workloads_secrets.timeout,
1426
+ metadata: metadata,
1427
+ retry_policy: @config.rpcs.list_user_workloads_secrets.retry_policy
1428
+
1429
+ options.apply_defaults timeout: @config.timeout,
1430
+ metadata: @config.metadata,
1431
+ retry_policy: @config.retry_policy
1432
+
1433
+ @environments_stub.call_rpc :list_user_workloads_secrets, request, options: options do |response, operation|
1434
+ response = ::Gapic::PagedEnumerable.new @environments_stub, :list_user_workloads_secrets, request, response, operation, options
1435
+ yield response, operation if block_given?
1436
+ return response
1437
+ end
1438
+ rescue ::GRPC::BadStatus => e
1439
+ raise ::Google::Cloud::Error.from_error(e)
1440
+ end
1441
+
1442
+ ##
1443
+ # Updates a user workloads Secret.
1444
+ #
1445
+ # This method is supported for Cloud Composer environments in versions
1446
+ # composer-3.*.*-airflow-*.*.* and newer.
1447
+ #
1448
+ # @overload update_user_workloads_secret(request, options = nil)
1449
+ # Pass arguments to `update_user_workloads_secret` via a request object, either of type
1450
+ # {::Google::Cloud::Orchestration::Airflow::Service::V1::UpdateUserWorkloadsSecretRequest} or an equivalent Hash.
1451
+ #
1452
+ # @param request [::Google::Cloud::Orchestration::Airflow::Service::V1::UpdateUserWorkloadsSecretRequest, ::Hash]
1453
+ # A request object representing the call parameters. Required. To specify no
1454
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1455
+ # @param options [::Gapic::CallOptions, ::Hash]
1456
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1457
+ #
1458
+ # @overload update_user_workloads_secret(user_workloads_secret: nil)
1459
+ # Pass arguments to `update_user_workloads_secret` via keyword arguments. Note that at
1460
+ # least one keyword argument is required. To specify no parameters, or to keep all
1461
+ # the default parameter values, pass an empty Hash as a request object (see above).
1462
+ #
1463
+ # @param user_workloads_secret [::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsSecret, ::Hash]
1464
+ # Optional. User workloads Secret to override.
1465
+ #
1466
+ # @yield [response, operation] Access the result along with the RPC operation
1467
+ # @yieldparam response [::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsSecret]
1468
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1469
+ #
1470
+ # @return [::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsSecret]
1471
+ #
1472
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1473
+ #
1474
+ # @example Basic example
1475
+ # require "google/cloud/orchestration/airflow/service/v1"
1476
+ #
1477
+ # # Create a client object. The client can be reused for multiple calls.
1478
+ # client = Google::Cloud::Orchestration::Airflow::Service::V1::Environments::Client.new
1479
+ #
1480
+ # # Create a request. To set request fields, pass in keyword arguments.
1481
+ # request = Google::Cloud::Orchestration::Airflow::Service::V1::UpdateUserWorkloadsSecretRequest.new
1482
+ #
1483
+ # # Call the update_user_workloads_secret method.
1484
+ # result = client.update_user_workloads_secret request
1485
+ #
1486
+ # # The returned object is of type Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsSecret.
1487
+ # p result
1488
+ #
1489
+ def update_user_workloads_secret request, options = nil
1490
+ raise ::ArgumentError, "request must be provided" if request.nil?
1491
+
1492
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::UpdateUserWorkloadsSecretRequest
1493
+
1494
+ # Converts hash and nil to an options object
1495
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1496
+
1497
+ # Customize the options with defaults
1498
+ metadata = @config.rpcs.update_user_workloads_secret.metadata.to_h
1499
+
1500
+ # Set x-goog-api-client and x-goog-user-project headers
1501
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1502
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1503
+ gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION
1504
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1505
+
1506
+ header_params = {}
1507
+ if request.user_workloads_secret&.name
1508
+ header_params["user_workloads_secret.name"] = request.user_workloads_secret.name
1509
+ end
1510
+
1511
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1512
+ metadata[:"x-goog-request-params"] ||= request_params_header
1513
+
1514
+ options.apply_defaults timeout: @config.rpcs.update_user_workloads_secret.timeout,
1515
+ metadata: metadata,
1516
+ retry_policy: @config.rpcs.update_user_workloads_secret.retry_policy
1517
+
1518
+ options.apply_defaults timeout: @config.timeout,
1519
+ metadata: @config.metadata,
1520
+ retry_policy: @config.retry_policy
1521
+
1522
+ @environments_stub.call_rpc :update_user_workloads_secret, request, options: options do |response, operation|
1523
+ yield response, operation if block_given?
1524
+ return response
1525
+ end
1526
+ rescue ::GRPC::BadStatus => e
1527
+ raise ::Google::Cloud::Error.from_error(e)
1528
+ end
1529
+
1530
+ ##
1531
+ # Deletes a user workloads Secret.
1532
+ #
1533
+ # This method is supported for Cloud Composer environments in versions
1534
+ # composer-3.*.*-airflow-*.*.* and newer.
1535
+ #
1536
+ # @overload delete_user_workloads_secret(request, options = nil)
1537
+ # Pass arguments to `delete_user_workloads_secret` via a request object, either of type
1538
+ # {::Google::Cloud::Orchestration::Airflow::Service::V1::DeleteUserWorkloadsSecretRequest} or an equivalent Hash.
1539
+ #
1540
+ # @param request [::Google::Cloud::Orchestration::Airflow::Service::V1::DeleteUserWorkloadsSecretRequest, ::Hash]
1541
+ # A request object representing the call parameters. Required. To specify no
1542
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1543
+ # @param options [::Gapic::CallOptions, ::Hash]
1544
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1545
+ #
1546
+ # @overload delete_user_workloads_secret(name: nil)
1547
+ # Pass arguments to `delete_user_workloads_secret` via keyword arguments. Note that at
1548
+ # least one keyword argument is required. To specify no parameters, or to keep all
1549
+ # the default parameter values, pass an empty Hash as a request object (see above).
1550
+ #
1551
+ # @param name [::String]
1552
+ # Required. The Secret to delete, in the form:
1553
+ # "projects/\\{projectId}/locations/\\{locationId}/environments/\\{environmentId}/userWorkloadsSecrets/\\{userWorkloadsSecretId}"
1554
+ #
1555
+ # @yield [response, operation] Access the result along with the RPC operation
1556
+ # @yieldparam response [::Google::Protobuf::Empty]
1557
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1558
+ #
1559
+ # @return [::Google::Protobuf::Empty]
1560
+ #
1561
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1562
+ #
1563
+ # @example Basic example
1564
+ # require "google/cloud/orchestration/airflow/service/v1"
1565
+ #
1566
+ # # Create a client object. The client can be reused for multiple calls.
1567
+ # client = Google::Cloud::Orchestration::Airflow::Service::V1::Environments::Client.new
1568
+ #
1569
+ # # Create a request. To set request fields, pass in keyword arguments.
1570
+ # request = Google::Cloud::Orchestration::Airflow::Service::V1::DeleteUserWorkloadsSecretRequest.new
1571
+ #
1572
+ # # Call the delete_user_workloads_secret method.
1573
+ # result = client.delete_user_workloads_secret request
1574
+ #
1575
+ # # The returned object is of type Google::Protobuf::Empty.
1576
+ # p result
1577
+ #
1578
+ def delete_user_workloads_secret request, options = nil
1579
+ raise ::ArgumentError, "request must be provided" if request.nil?
1580
+
1581
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::DeleteUserWorkloadsSecretRequest
1582
+
1583
+ # Converts hash and nil to an options object
1584
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1585
+
1586
+ # Customize the options with defaults
1587
+ metadata = @config.rpcs.delete_user_workloads_secret.metadata.to_h
1588
+
1589
+ # Set x-goog-api-client and x-goog-user-project headers
1590
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1591
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1592
+ gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION
1593
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1594
+
1595
+ header_params = {}
1596
+ if request.name
1597
+ header_params["name"] = request.name
1598
+ end
1599
+
1600
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1601
+ metadata[:"x-goog-request-params"] ||= request_params_header
1602
+
1603
+ options.apply_defaults timeout: @config.rpcs.delete_user_workloads_secret.timeout,
1604
+ metadata: metadata,
1605
+ retry_policy: @config.rpcs.delete_user_workloads_secret.retry_policy
1606
+
1607
+ options.apply_defaults timeout: @config.timeout,
1608
+ metadata: @config.metadata,
1609
+ retry_policy: @config.retry_policy
1610
+
1611
+ @environments_stub.call_rpc :delete_user_workloads_secret, request, options: options do |response, operation|
1612
+ yield response, operation if block_given?
1613
+ return response
1614
+ end
1615
+ rescue ::GRPC::BadStatus => e
1616
+ raise ::Google::Cloud::Error.from_error(e)
1617
+ end
1618
+
1619
+ ##
1620
+ # Creates a user workloads ConfigMap.
1621
+ #
1622
+ # This method is supported for Cloud Composer environments in versions
1623
+ # composer-3.*.*-airflow-*.*.* and newer.
1624
+ #
1625
+ # @overload create_user_workloads_config_map(request, options = nil)
1626
+ # Pass arguments to `create_user_workloads_config_map` via a request object, either of type
1627
+ # {::Google::Cloud::Orchestration::Airflow::Service::V1::CreateUserWorkloadsConfigMapRequest} or an equivalent Hash.
1628
+ #
1629
+ # @param request [::Google::Cloud::Orchestration::Airflow::Service::V1::CreateUserWorkloadsConfigMapRequest, ::Hash]
1630
+ # A request object representing the call parameters. Required. To specify no
1631
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1632
+ # @param options [::Gapic::CallOptions, ::Hash]
1633
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1634
+ #
1635
+ # @overload create_user_workloads_config_map(parent: nil, user_workloads_config_map: nil)
1636
+ # Pass arguments to `create_user_workloads_config_map` via keyword arguments. Note that at
1637
+ # least one keyword argument is required. To specify no parameters, or to keep all
1638
+ # the default parameter values, pass an empty Hash as a request object (see above).
1639
+ #
1640
+ # @param parent [::String]
1641
+ # Required. The environment name to create a ConfigMap for, in the form:
1642
+ # "projects/\\{projectId}/locations/\\{locationId}/environments/\\{environmentId}"
1643
+ # @param user_workloads_config_map [::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsConfigMap, ::Hash]
1644
+ # Required. User workloads ConfigMap to create.
1645
+ #
1646
+ # @yield [response, operation] Access the result along with the RPC operation
1647
+ # @yieldparam response [::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsConfigMap]
1648
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1649
+ #
1650
+ # @return [::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsConfigMap]
1651
+ #
1652
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1653
+ #
1654
+ # @example Basic example
1655
+ # require "google/cloud/orchestration/airflow/service/v1"
1656
+ #
1657
+ # # Create a client object. The client can be reused for multiple calls.
1658
+ # client = Google::Cloud::Orchestration::Airflow::Service::V1::Environments::Client.new
1659
+ #
1660
+ # # Create a request. To set request fields, pass in keyword arguments.
1661
+ # request = Google::Cloud::Orchestration::Airflow::Service::V1::CreateUserWorkloadsConfigMapRequest.new
1662
+ #
1663
+ # # Call the create_user_workloads_config_map method.
1664
+ # result = client.create_user_workloads_config_map request
1665
+ #
1666
+ # # The returned object is of type Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsConfigMap.
1667
+ # p result
1668
+ #
1669
+ def create_user_workloads_config_map request, options = nil
1670
+ raise ::ArgumentError, "request must be provided" if request.nil?
1671
+
1672
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::CreateUserWorkloadsConfigMapRequest
1673
+
1674
+ # Converts hash and nil to an options object
1675
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1676
+
1677
+ # Customize the options with defaults
1678
+ metadata = @config.rpcs.create_user_workloads_config_map.metadata.to_h
1679
+
1680
+ # Set x-goog-api-client and x-goog-user-project headers
1681
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1682
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1683
+ gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION
1684
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1685
+
1686
+ header_params = {}
1687
+ if request.parent
1688
+ header_params["parent"] = request.parent
1689
+ end
1690
+
1691
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1692
+ metadata[:"x-goog-request-params"] ||= request_params_header
1693
+
1694
+ options.apply_defaults timeout: @config.rpcs.create_user_workloads_config_map.timeout,
1695
+ metadata: metadata,
1696
+ retry_policy: @config.rpcs.create_user_workloads_config_map.retry_policy
1697
+
1698
+ options.apply_defaults timeout: @config.timeout,
1699
+ metadata: @config.metadata,
1700
+ retry_policy: @config.retry_policy
1701
+
1702
+ @environments_stub.call_rpc :create_user_workloads_config_map, request, options: options do |response, operation|
1703
+ yield response, operation if block_given?
1704
+ return response
1705
+ end
1706
+ rescue ::GRPC::BadStatus => e
1707
+ raise ::Google::Cloud::Error.from_error(e)
1708
+ end
1709
+
1710
+ ##
1711
+ # Gets an existing user workloads ConfigMap.
1712
+ #
1713
+ # This method is supported for Cloud Composer environments in versions
1714
+ # composer-3.*.*-airflow-*.*.* and newer.
1715
+ #
1716
+ # @overload get_user_workloads_config_map(request, options = nil)
1717
+ # Pass arguments to `get_user_workloads_config_map` via a request object, either of type
1718
+ # {::Google::Cloud::Orchestration::Airflow::Service::V1::GetUserWorkloadsConfigMapRequest} or an equivalent Hash.
1719
+ #
1720
+ # @param request [::Google::Cloud::Orchestration::Airflow::Service::V1::GetUserWorkloadsConfigMapRequest, ::Hash]
1721
+ # A request object representing the call parameters. Required. To specify no
1722
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1723
+ # @param options [::Gapic::CallOptions, ::Hash]
1724
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1725
+ #
1726
+ # @overload get_user_workloads_config_map(name: nil)
1727
+ # Pass arguments to `get_user_workloads_config_map` via keyword arguments. Note that at
1728
+ # least one keyword argument is required. To specify no parameters, or to keep all
1729
+ # the default parameter values, pass an empty Hash as a request object (see above).
1730
+ #
1731
+ # @param name [::String]
1732
+ # Required. The resource name of the ConfigMap to get, in the form:
1733
+ # "projects/\\{projectId}/locations/\\{locationId}/environments/\\{environmentId}/userWorkloadsConfigMaps/\\{userWorkloadsConfigMapId}"
1734
+ #
1735
+ # @yield [response, operation] Access the result along with the RPC operation
1736
+ # @yieldparam response [::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsConfigMap]
1737
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1738
+ #
1739
+ # @return [::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsConfigMap]
1740
+ #
1741
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1742
+ #
1743
+ # @example Basic example
1744
+ # require "google/cloud/orchestration/airflow/service/v1"
1745
+ #
1746
+ # # Create a client object. The client can be reused for multiple calls.
1747
+ # client = Google::Cloud::Orchestration::Airflow::Service::V1::Environments::Client.new
1748
+ #
1749
+ # # Create a request. To set request fields, pass in keyword arguments.
1750
+ # request = Google::Cloud::Orchestration::Airflow::Service::V1::GetUserWorkloadsConfigMapRequest.new
1751
+ #
1752
+ # # Call the get_user_workloads_config_map method.
1753
+ # result = client.get_user_workloads_config_map request
1754
+ #
1755
+ # # The returned object is of type Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsConfigMap.
1756
+ # p result
1757
+ #
1758
+ def get_user_workloads_config_map request, options = nil
1759
+ raise ::ArgumentError, "request must be provided" if request.nil?
1760
+
1761
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::GetUserWorkloadsConfigMapRequest
1762
+
1763
+ # Converts hash and nil to an options object
1764
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1765
+
1766
+ # Customize the options with defaults
1767
+ metadata = @config.rpcs.get_user_workloads_config_map.metadata.to_h
1768
+
1769
+ # Set x-goog-api-client and x-goog-user-project headers
1770
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1771
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1772
+ gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION
1773
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1774
+
1775
+ header_params = {}
1776
+ if request.name
1777
+ header_params["name"] = request.name
1778
+ end
1779
+
1780
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1781
+ metadata[:"x-goog-request-params"] ||= request_params_header
1782
+
1783
+ options.apply_defaults timeout: @config.rpcs.get_user_workloads_config_map.timeout,
1784
+ metadata: metadata,
1785
+ retry_policy: @config.rpcs.get_user_workloads_config_map.retry_policy
1786
+
1787
+ options.apply_defaults timeout: @config.timeout,
1788
+ metadata: @config.metadata,
1789
+ retry_policy: @config.retry_policy
1790
+
1791
+ @environments_stub.call_rpc :get_user_workloads_config_map, request, options: options do |response, operation|
1792
+ yield response, operation if block_given?
1793
+ return response
1794
+ end
1795
+ rescue ::GRPC::BadStatus => e
1796
+ raise ::Google::Cloud::Error.from_error(e)
1797
+ end
1798
+
1799
+ ##
1800
+ # Lists user workloads ConfigMaps.
1801
+ #
1802
+ # This method is supported for Cloud Composer environments in versions
1803
+ # composer-3.*.*-airflow-*.*.* and newer.
1804
+ #
1805
+ # @overload list_user_workloads_config_maps(request, options = nil)
1806
+ # Pass arguments to `list_user_workloads_config_maps` via a request object, either of type
1807
+ # {::Google::Cloud::Orchestration::Airflow::Service::V1::ListUserWorkloadsConfigMapsRequest} or an equivalent Hash.
1808
+ #
1809
+ # @param request [::Google::Cloud::Orchestration::Airflow::Service::V1::ListUserWorkloadsConfigMapsRequest, ::Hash]
1810
+ # A request object representing the call parameters. Required. To specify no
1811
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1812
+ # @param options [::Gapic::CallOptions, ::Hash]
1813
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1814
+ #
1815
+ # @overload list_user_workloads_config_maps(parent: nil, page_size: nil, page_token: nil)
1816
+ # Pass arguments to `list_user_workloads_config_maps` via keyword arguments. Note that at
1817
+ # least one keyword argument is required. To specify no parameters, or to keep all
1818
+ # the default parameter values, pass an empty Hash as a request object (see above).
1819
+ #
1820
+ # @param parent [::String]
1821
+ # Required. List ConfigMaps in the given environment, in the form:
1822
+ # "projects/\\{projectId}/locations/\\{locationId}/environments/\\{environmentId}"
1823
+ # @param page_size [::Integer]
1824
+ # Optional. The maximum number of ConfigMaps to return.
1825
+ # @param page_token [::String]
1826
+ # Optional. The next_page_token value returned from a previous List request,
1827
+ # if any.
1828
+ #
1829
+ # @yield [response, operation] Access the result along with the RPC operation
1830
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsConfigMap>]
1831
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1832
+ #
1833
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsConfigMap>]
1834
+ #
1835
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1836
+ #
1837
+ # @example Basic example
1838
+ # require "google/cloud/orchestration/airflow/service/v1"
1839
+ #
1840
+ # # Create a client object. The client can be reused for multiple calls.
1841
+ # client = Google::Cloud::Orchestration::Airflow::Service::V1::Environments::Client.new
1842
+ #
1843
+ # # Create a request. To set request fields, pass in keyword arguments.
1844
+ # request = Google::Cloud::Orchestration::Airflow::Service::V1::ListUserWorkloadsConfigMapsRequest.new
1845
+ #
1846
+ # # Call the list_user_workloads_config_maps method.
1847
+ # result = client.list_user_workloads_config_maps request
1848
+ #
1849
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1850
+ # # over elements, and API calls will be issued to fetch pages as needed.
1851
+ # result.each do |item|
1852
+ # # Each element is of type ::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsConfigMap.
1853
+ # p item
1854
+ # end
1855
+ #
1856
+ def list_user_workloads_config_maps request, options = nil
1857
+ raise ::ArgumentError, "request must be provided" if request.nil?
1858
+
1859
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::ListUserWorkloadsConfigMapsRequest
1860
+
1861
+ # Converts hash and nil to an options object
1862
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1863
+
1864
+ # Customize the options with defaults
1865
+ metadata = @config.rpcs.list_user_workloads_config_maps.metadata.to_h
1866
+
1867
+ # Set x-goog-api-client and x-goog-user-project headers
1868
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1869
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1870
+ gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION
1871
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1872
+
1873
+ header_params = {}
1874
+ if request.parent
1875
+ header_params["parent"] = request.parent
1876
+ end
1877
+
1878
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1879
+ metadata[:"x-goog-request-params"] ||= request_params_header
1880
+
1881
+ options.apply_defaults timeout: @config.rpcs.list_user_workloads_config_maps.timeout,
1882
+ metadata: metadata,
1883
+ retry_policy: @config.rpcs.list_user_workloads_config_maps.retry_policy
1884
+
1885
+ options.apply_defaults timeout: @config.timeout,
1886
+ metadata: @config.metadata,
1887
+ retry_policy: @config.retry_policy
1888
+
1889
+ @environments_stub.call_rpc :list_user_workloads_config_maps, request, options: options do |response, operation|
1890
+ response = ::Gapic::PagedEnumerable.new @environments_stub, :list_user_workloads_config_maps, request, response, operation, options
1891
+ yield response, operation if block_given?
1892
+ return response
1893
+ end
1894
+ rescue ::GRPC::BadStatus => e
1895
+ raise ::Google::Cloud::Error.from_error(e)
1896
+ end
1897
+
1898
+ ##
1899
+ # Updates a user workloads ConfigMap.
1900
+ #
1901
+ # This method is supported for Cloud Composer environments in versions
1902
+ # composer-3.*.*-airflow-*.*.* and newer.
1903
+ #
1904
+ # @overload update_user_workloads_config_map(request, options = nil)
1905
+ # Pass arguments to `update_user_workloads_config_map` via a request object, either of type
1906
+ # {::Google::Cloud::Orchestration::Airflow::Service::V1::UpdateUserWorkloadsConfigMapRequest} or an equivalent Hash.
1907
+ #
1908
+ # @param request [::Google::Cloud::Orchestration::Airflow::Service::V1::UpdateUserWorkloadsConfigMapRequest, ::Hash]
1909
+ # A request object representing the call parameters. Required. To specify no
1910
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1911
+ # @param options [::Gapic::CallOptions, ::Hash]
1912
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1913
+ #
1914
+ # @overload update_user_workloads_config_map(user_workloads_config_map: nil)
1915
+ # Pass arguments to `update_user_workloads_config_map` via keyword arguments. Note that at
1916
+ # least one keyword argument is required. To specify no parameters, or to keep all
1917
+ # the default parameter values, pass an empty Hash as a request object (see above).
1918
+ #
1919
+ # @param user_workloads_config_map [::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsConfigMap, ::Hash]
1920
+ # Optional. User workloads ConfigMap to override.
1921
+ #
1922
+ # @yield [response, operation] Access the result along with the RPC operation
1923
+ # @yieldparam response [::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsConfigMap]
1924
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1925
+ #
1926
+ # @return [::Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsConfigMap]
1927
+ #
1928
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1929
+ #
1930
+ # @example Basic example
1931
+ # require "google/cloud/orchestration/airflow/service/v1"
1932
+ #
1933
+ # # Create a client object. The client can be reused for multiple calls.
1934
+ # client = Google::Cloud::Orchestration::Airflow::Service::V1::Environments::Client.new
1935
+ #
1936
+ # # Create a request. To set request fields, pass in keyword arguments.
1937
+ # request = Google::Cloud::Orchestration::Airflow::Service::V1::UpdateUserWorkloadsConfigMapRequest.new
1938
+ #
1939
+ # # Call the update_user_workloads_config_map method.
1940
+ # result = client.update_user_workloads_config_map request
1941
+ #
1942
+ # # The returned object is of type Google::Cloud::Orchestration::Airflow::Service::V1::UserWorkloadsConfigMap.
1943
+ # p result
1944
+ #
1945
+ def update_user_workloads_config_map request, options = nil
1946
+ raise ::ArgumentError, "request must be provided" if request.nil?
1947
+
1948
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::UpdateUserWorkloadsConfigMapRequest
1949
+
1950
+ # Converts hash and nil to an options object
1951
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1952
+
1953
+ # Customize the options with defaults
1954
+ metadata = @config.rpcs.update_user_workloads_config_map.metadata.to_h
1955
+
1956
+ # Set x-goog-api-client and x-goog-user-project headers
1957
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1958
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1959
+ gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION
1960
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1961
+
1962
+ header_params = {}
1963
+ if request.user_workloads_config_map&.name
1964
+ header_params["user_workloads_config_map.name"] = request.user_workloads_config_map.name
1965
+ end
1966
+
1967
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1968
+ metadata[:"x-goog-request-params"] ||= request_params_header
1969
+
1970
+ options.apply_defaults timeout: @config.rpcs.update_user_workloads_config_map.timeout,
1971
+ metadata: metadata,
1972
+ retry_policy: @config.rpcs.update_user_workloads_config_map.retry_policy
1973
+
1974
+ options.apply_defaults timeout: @config.timeout,
1975
+ metadata: @config.metadata,
1976
+ retry_policy: @config.retry_policy
1977
+
1978
+ @environments_stub.call_rpc :update_user_workloads_config_map, request, options: options do |response, operation|
1979
+ yield response, operation if block_given?
1980
+ return response
1981
+ end
1982
+ rescue ::GRPC::BadStatus => e
1983
+ raise ::Google::Cloud::Error.from_error(e)
1984
+ end
1985
+
1986
+ ##
1987
+ # Deletes a user workloads ConfigMap.
1988
+ #
1989
+ # This method is supported for Cloud Composer environments in versions
1990
+ # composer-3.*.*-airflow-*.*.* and newer.
1991
+ #
1992
+ # @overload delete_user_workloads_config_map(request, options = nil)
1993
+ # Pass arguments to `delete_user_workloads_config_map` via a request object, either of type
1994
+ # {::Google::Cloud::Orchestration::Airflow::Service::V1::DeleteUserWorkloadsConfigMapRequest} or an equivalent Hash.
1995
+ #
1996
+ # @param request [::Google::Cloud::Orchestration::Airflow::Service::V1::DeleteUserWorkloadsConfigMapRequest, ::Hash]
1997
+ # A request object representing the call parameters. Required. To specify no
1998
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1999
+ # @param options [::Gapic::CallOptions, ::Hash]
2000
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2001
+ #
2002
+ # @overload delete_user_workloads_config_map(name: nil)
2003
+ # Pass arguments to `delete_user_workloads_config_map` via keyword arguments. Note that at
2004
+ # least one keyword argument is required. To specify no parameters, or to keep all
2005
+ # the default parameter values, pass an empty Hash as a request object (see above).
2006
+ #
2007
+ # @param name [::String]
2008
+ # Required. The ConfigMap to delete, in the form:
2009
+ # "projects/\\{projectId}/locations/\\{locationId}/environments/\\{environmentId}/userWorkloadsConfigMaps/\\{userWorkloadsConfigMapId}"
2010
+ #
2011
+ # @yield [response, operation] Access the result along with the RPC operation
2012
+ # @yieldparam response [::Google::Protobuf::Empty]
2013
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2014
+ #
2015
+ # @return [::Google::Protobuf::Empty]
2016
+ #
2017
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2018
+ #
2019
+ # @example Basic example
2020
+ # require "google/cloud/orchestration/airflow/service/v1"
2021
+ #
2022
+ # # Create a client object. The client can be reused for multiple calls.
2023
+ # client = Google::Cloud::Orchestration::Airflow::Service::V1::Environments::Client.new
2024
+ #
2025
+ # # Create a request. To set request fields, pass in keyword arguments.
2026
+ # request = Google::Cloud::Orchestration::Airflow::Service::V1::DeleteUserWorkloadsConfigMapRequest.new
2027
+ #
2028
+ # # Call the delete_user_workloads_config_map method.
2029
+ # result = client.delete_user_workloads_config_map request
2030
+ #
2031
+ # # The returned object is of type Google::Protobuf::Empty.
2032
+ # p result
2033
+ #
2034
+ def delete_user_workloads_config_map request, options = nil
2035
+ raise ::ArgumentError, "request must be provided" if request.nil?
2036
+
2037
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::DeleteUserWorkloadsConfigMapRequest
2038
+
2039
+ # Converts hash and nil to an options object
2040
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2041
+
2042
+ # Customize the options with defaults
2043
+ metadata = @config.rpcs.delete_user_workloads_config_map.metadata.to_h
2044
+
2045
+ # Set x-goog-api-client and x-goog-user-project headers
2046
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2047
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2048
+ gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION
2049
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2050
+
2051
+ header_params = {}
2052
+ if request.name
2053
+ header_params["name"] = request.name
2054
+ end
2055
+
2056
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2057
+ metadata[:"x-goog-request-params"] ||= request_params_header
2058
+
2059
+ options.apply_defaults timeout: @config.rpcs.delete_user_workloads_config_map.timeout,
2060
+ metadata: metadata,
2061
+ retry_policy: @config.rpcs.delete_user_workloads_config_map.retry_policy
2062
+
2063
+ options.apply_defaults timeout: @config.timeout,
2064
+ metadata: @config.metadata,
2065
+ retry_policy: @config.retry_policy
2066
+
2067
+ @environments_stub.call_rpc :delete_user_workloads_config_map, request, options: options do |response, operation|
2068
+ yield response, operation if block_given?
2069
+ return response
2070
+ end
2071
+ rescue ::GRPC::BadStatus => e
2072
+ raise ::Google::Cloud::Error.from_error(e)
2073
+ end
2074
+
1055
2075
  ##
1056
2076
  # Creates a snapshots of a Cloud Composer environment.
1057
2077
  #
@@ -1638,6 +2658,61 @@ module Google
1638
2658
  #
1639
2659
  attr_reader :poll_airflow_command
1640
2660
  ##
2661
+ # RPC-specific configuration for `list_workloads`
2662
+ # @return [::Gapic::Config::Method]
2663
+ #
2664
+ attr_reader :list_workloads
2665
+ ##
2666
+ # RPC-specific configuration for `create_user_workloads_secret`
2667
+ # @return [::Gapic::Config::Method]
2668
+ #
2669
+ attr_reader :create_user_workloads_secret
2670
+ ##
2671
+ # RPC-specific configuration for `get_user_workloads_secret`
2672
+ # @return [::Gapic::Config::Method]
2673
+ #
2674
+ attr_reader :get_user_workloads_secret
2675
+ ##
2676
+ # RPC-specific configuration for `list_user_workloads_secrets`
2677
+ # @return [::Gapic::Config::Method]
2678
+ #
2679
+ attr_reader :list_user_workloads_secrets
2680
+ ##
2681
+ # RPC-specific configuration for `update_user_workloads_secret`
2682
+ # @return [::Gapic::Config::Method]
2683
+ #
2684
+ attr_reader :update_user_workloads_secret
2685
+ ##
2686
+ # RPC-specific configuration for `delete_user_workloads_secret`
2687
+ # @return [::Gapic::Config::Method]
2688
+ #
2689
+ attr_reader :delete_user_workloads_secret
2690
+ ##
2691
+ # RPC-specific configuration for `create_user_workloads_config_map`
2692
+ # @return [::Gapic::Config::Method]
2693
+ #
2694
+ attr_reader :create_user_workloads_config_map
2695
+ ##
2696
+ # RPC-specific configuration for `get_user_workloads_config_map`
2697
+ # @return [::Gapic::Config::Method]
2698
+ #
2699
+ attr_reader :get_user_workloads_config_map
2700
+ ##
2701
+ # RPC-specific configuration for `list_user_workloads_config_maps`
2702
+ # @return [::Gapic::Config::Method]
2703
+ #
2704
+ attr_reader :list_user_workloads_config_maps
2705
+ ##
2706
+ # RPC-specific configuration for `update_user_workloads_config_map`
2707
+ # @return [::Gapic::Config::Method]
2708
+ #
2709
+ attr_reader :update_user_workloads_config_map
2710
+ ##
2711
+ # RPC-specific configuration for `delete_user_workloads_config_map`
2712
+ # @return [::Gapic::Config::Method]
2713
+ #
2714
+ attr_reader :delete_user_workloads_config_map
2715
+ ##
1641
2716
  # RPC-specific configuration for `save_snapshot`
1642
2717
  # @return [::Gapic::Config::Method]
1643
2718
  #
@@ -1676,6 +2751,28 @@ module Google
1676
2751
  @stop_airflow_command = ::Gapic::Config::Method.new stop_airflow_command_config
1677
2752
  poll_airflow_command_config = parent_rpcs.poll_airflow_command if parent_rpcs.respond_to? :poll_airflow_command
1678
2753
  @poll_airflow_command = ::Gapic::Config::Method.new poll_airflow_command_config
2754
+ list_workloads_config = parent_rpcs.list_workloads if parent_rpcs.respond_to? :list_workloads
2755
+ @list_workloads = ::Gapic::Config::Method.new list_workloads_config
2756
+ create_user_workloads_secret_config = parent_rpcs.create_user_workloads_secret if parent_rpcs.respond_to? :create_user_workloads_secret
2757
+ @create_user_workloads_secret = ::Gapic::Config::Method.new create_user_workloads_secret_config
2758
+ get_user_workloads_secret_config = parent_rpcs.get_user_workloads_secret if parent_rpcs.respond_to? :get_user_workloads_secret
2759
+ @get_user_workloads_secret = ::Gapic::Config::Method.new get_user_workloads_secret_config
2760
+ list_user_workloads_secrets_config = parent_rpcs.list_user_workloads_secrets if parent_rpcs.respond_to? :list_user_workloads_secrets
2761
+ @list_user_workloads_secrets = ::Gapic::Config::Method.new list_user_workloads_secrets_config
2762
+ update_user_workloads_secret_config = parent_rpcs.update_user_workloads_secret if parent_rpcs.respond_to? :update_user_workloads_secret
2763
+ @update_user_workloads_secret = ::Gapic::Config::Method.new update_user_workloads_secret_config
2764
+ delete_user_workloads_secret_config = parent_rpcs.delete_user_workloads_secret if parent_rpcs.respond_to? :delete_user_workloads_secret
2765
+ @delete_user_workloads_secret = ::Gapic::Config::Method.new delete_user_workloads_secret_config
2766
+ create_user_workloads_config_map_config = parent_rpcs.create_user_workloads_config_map if parent_rpcs.respond_to? :create_user_workloads_config_map
2767
+ @create_user_workloads_config_map = ::Gapic::Config::Method.new create_user_workloads_config_map_config
2768
+ get_user_workloads_config_map_config = parent_rpcs.get_user_workloads_config_map if parent_rpcs.respond_to? :get_user_workloads_config_map
2769
+ @get_user_workloads_config_map = ::Gapic::Config::Method.new get_user_workloads_config_map_config
2770
+ list_user_workloads_config_maps_config = parent_rpcs.list_user_workloads_config_maps if parent_rpcs.respond_to? :list_user_workloads_config_maps
2771
+ @list_user_workloads_config_maps = ::Gapic::Config::Method.new list_user_workloads_config_maps_config
2772
+ update_user_workloads_config_map_config = parent_rpcs.update_user_workloads_config_map if parent_rpcs.respond_to? :update_user_workloads_config_map
2773
+ @update_user_workloads_config_map = ::Gapic::Config::Method.new update_user_workloads_config_map_config
2774
+ delete_user_workloads_config_map_config = parent_rpcs.delete_user_workloads_config_map if parent_rpcs.respond_to? :delete_user_workloads_config_map
2775
+ @delete_user_workloads_config_map = ::Gapic::Config::Method.new delete_user_workloads_config_map_config
1679
2776
  save_snapshot_config = parent_rpcs.save_snapshot if parent_rpcs.respond_to? :save_snapshot
1680
2777
  @save_snapshot = ::Gapic::Config::Method.new save_snapshot_config
1681
2778
  load_snapshot_config = parent_rpcs.load_snapshot if parent_rpcs.respond_to? :load_snapshot