google-cloud-deploy-v1 0.14.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/google/cloud/deploy/v1/cloud_deploy/client.rb +602 -4
- data/lib/google/cloud/deploy/v1/cloud_deploy/paths.rb +19 -0
- data/lib/google/cloud/deploy/v1/cloud_deploy/rest/client.rb +566 -4
- data/lib/google/cloud/deploy/v1/cloud_deploy/rest/service_stub.rb +297 -0
- data/lib/google/cloud/deploy/v1/cloud_deploy_pb.rb +15 -1
- data/lib/google/cloud/deploy/v1/cloud_deploy_services_pb.rb +10 -0
- data/lib/google/cloud/deploy/v1/version.rb +1 -1
- data/proto_docs/google/api/client.rb +13 -0
- data/proto_docs/google/cloud/deploy/v1/cloud_deploy.rb +420 -27
- metadata +2 -2
@@ -121,6 +121,25 @@ module Google
|
|
121
121
|
"projects/#{project}/locations/#{location}/config"
|
122
122
|
end
|
123
123
|
|
124
|
+
##
|
125
|
+
# Create a fully-qualified CustomTargetType resource string.
|
126
|
+
#
|
127
|
+
# The resource will be in the following format:
|
128
|
+
#
|
129
|
+
# `projects/{project}/locations/{location}/customTargetTypes/{custom_target_type}`
|
130
|
+
#
|
131
|
+
# @param project [String]
|
132
|
+
# @param location [String]
|
133
|
+
# @param custom_target_type [String]
|
134
|
+
#
|
135
|
+
# @return [::String]
|
136
|
+
def custom_target_type_path project:, location:, custom_target_type:
|
137
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
138
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
139
|
+
|
140
|
+
"projects/#{project}/locations/#{location}/customTargetTypes/#{custom_target_type}"
|
141
|
+
end
|
142
|
+
|
124
143
|
##
|
125
144
|
# Create a fully-qualified DeliveryPipeline resource string.
|
126
145
|
#
|
@@ -101,6 +101,22 @@ module Google
|
|
101
101
|
|
102
102
|
default_config.rpcs.delete_target.timeout = 60.0
|
103
103
|
|
104
|
+
default_config.rpcs.list_custom_target_types.timeout = 60.0
|
105
|
+
default_config.rpcs.list_custom_target_types.retry_policy = {
|
106
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
107
|
+
}
|
108
|
+
|
109
|
+
default_config.rpcs.get_custom_target_type.timeout = 60.0
|
110
|
+
default_config.rpcs.get_custom_target_type.retry_policy = {
|
111
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
112
|
+
}
|
113
|
+
|
114
|
+
default_config.rpcs.create_custom_target_type.timeout = 60.0
|
115
|
+
|
116
|
+
default_config.rpcs.update_custom_target_type.timeout = 60.0
|
117
|
+
|
118
|
+
default_config.rpcs.delete_custom_target_type.timeout = 60.0
|
119
|
+
|
104
120
|
default_config.rpcs.list_releases.timeout = 60.0
|
105
121
|
default_config.rpcs.list_releases.retry_policy = {
|
106
122
|
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
@@ -1413,6 +1429,517 @@ module Google
|
|
1413
1429
|
raise ::Google::Cloud::Error.from_error(e)
|
1414
1430
|
end
|
1415
1431
|
|
1432
|
+
##
|
1433
|
+
# Lists CustomTargetTypes in a given project and location.
|
1434
|
+
#
|
1435
|
+
# @overload list_custom_target_types(request, options = nil)
|
1436
|
+
# Pass arguments to `list_custom_target_types` via a request object, either of type
|
1437
|
+
# {::Google::Cloud::Deploy::V1::ListCustomTargetTypesRequest} or an equivalent Hash.
|
1438
|
+
#
|
1439
|
+
# @param request [::Google::Cloud::Deploy::V1::ListCustomTargetTypesRequest, ::Hash]
|
1440
|
+
# A request object representing the call parameters. Required. To specify no
|
1441
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1442
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1443
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1444
|
+
#
|
1445
|
+
# @overload list_custom_target_types(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
1446
|
+
# Pass arguments to `list_custom_target_types` via keyword arguments. Note that at
|
1447
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1448
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1449
|
+
#
|
1450
|
+
# @param parent [::String]
|
1451
|
+
# Required. The parent that owns this collection of custom target types.
|
1452
|
+
# Format must be `projects/{project_id}/locations/{location_name}`.
|
1453
|
+
# @param page_size [::Integer]
|
1454
|
+
# Optional. The maximum number of `CustomTargetType` objects to return. The
|
1455
|
+
# service may return fewer than this value. If unspecified, at most 50
|
1456
|
+
# `CustomTargetType` objects will be returned. The maximum value is 1000;
|
1457
|
+
# values above 1000 will be set to 1000.
|
1458
|
+
# @param page_token [::String]
|
1459
|
+
# Optional. A page token, received from a previous `ListCustomTargetTypes`
|
1460
|
+
# call. Provide this to retrieve the subsequent page.
|
1461
|
+
#
|
1462
|
+
# When paginating, all other provided parameters match
|
1463
|
+
# the call that provided the page token.
|
1464
|
+
# @param filter [::String]
|
1465
|
+
# Optional. Filter custom target types to be returned. See
|
1466
|
+
# https://google.aip.dev/160 for more details.
|
1467
|
+
# @param order_by [::String]
|
1468
|
+
# Optional. Field to sort by. See https://google.aip.dev/132#ordering for
|
1469
|
+
# more details.
|
1470
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1471
|
+
# @yieldparam result [::Google::Cloud::Deploy::V1::ListCustomTargetTypesResponse]
|
1472
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1473
|
+
#
|
1474
|
+
# @return [::Google::Cloud::Deploy::V1::ListCustomTargetTypesResponse]
|
1475
|
+
#
|
1476
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1477
|
+
#
|
1478
|
+
# @example Basic example
|
1479
|
+
# require "google/cloud/deploy/v1"
|
1480
|
+
#
|
1481
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1482
|
+
# client = Google::Cloud::Deploy::V1::CloudDeploy::Rest::Client.new
|
1483
|
+
#
|
1484
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1485
|
+
# request = Google::Cloud::Deploy::V1::ListCustomTargetTypesRequest.new
|
1486
|
+
#
|
1487
|
+
# # Call the list_custom_target_types method.
|
1488
|
+
# result = client.list_custom_target_types request
|
1489
|
+
#
|
1490
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
1491
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
1492
|
+
# result.each do |item|
|
1493
|
+
# # Each element is of type ::Google::Cloud::Deploy::V1::CustomTargetType.
|
1494
|
+
# p item
|
1495
|
+
# end
|
1496
|
+
#
|
1497
|
+
def list_custom_target_types request, options = nil
|
1498
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1499
|
+
|
1500
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::ListCustomTargetTypesRequest
|
1501
|
+
|
1502
|
+
# Converts hash and nil to an options object
|
1503
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1504
|
+
|
1505
|
+
# Customize the options with defaults
|
1506
|
+
call_metadata = @config.rpcs.list_custom_target_types.metadata.to_h
|
1507
|
+
|
1508
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1509
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1510
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1511
|
+
gapic_version: ::Google::Cloud::Deploy::V1::VERSION,
|
1512
|
+
transports_version_send: [:rest]
|
1513
|
+
|
1514
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1515
|
+
|
1516
|
+
options.apply_defaults timeout: @config.rpcs.list_custom_target_types.timeout,
|
1517
|
+
metadata: call_metadata,
|
1518
|
+
retry_policy: @config.rpcs.list_custom_target_types.retry_policy
|
1519
|
+
|
1520
|
+
options.apply_defaults timeout: @config.timeout,
|
1521
|
+
metadata: @config.metadata,
|
1522
|
+
retry_policy: @config.retry_policy
|
1523
|
+
|
1524
|
+
@cloud_deploy_stub.list_custom_target_types request, options do |result, operation|
|
1525
|
+
yield result, operation if block_given?
|
1526
|
+
return result
|
1527
|
+
end
|
1528
|
+
rescue ::Gapic::Rest::Error => e
|
1529
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1530
|
+
end
|
1531
|
+
|
1532
|
+
##
|
1533
|
+
# Gets details of a single CustomTargetType.
|
1534
|
+
#
|
1535
|
+
# @overload get_custom_target_type(request, options = nil)
|
1536
|
+
# Pass arguments to `get_custom_target_type` via a request object, either of type
|
1537
|
+
# {::Google::Cloud::Deploy::V1::GetCustomTargetTypeRequest} or an equivalent Hash.
|
1538
|
+
#
|
1539
|
+
# @param request [::Google::Cloud::Deploy::V1::GetCustomTargetTypeRequest, ::Hash]
|
1540
|
+
# A request object representing the call parameters. Required. To specify no
|
1541
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1542
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1543
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1544
|
+
#
|
1545
|
+
# @overload get_custom_target_type(name: nil)
|
1546
|
+
# Pass arguments to `get_custom_target_type` via keyword arguments. Note that at
|
1547
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1548
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1549
|
+
#
|
1550
|
+
# @param name [::String]
|
1551
|
+
# Required. Name of the `CustomTargetType`. Format must be
|
1552
|
+
# `projects/{project_id}/locations/{location_name}/customTargetTypes/{custom_target_type}`.
|
1553
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1554
|
+
# @yieldparam result [::Google::Cloud::Deploy::V1::CustomTargetType]
|
1555
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1556
|
+
#
|
1557
|
+
# @return [::Google::Cloud::Deploy::V1::CustomTargetType]
|
1558
|
+
#
|
1559
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1560
|
+
#
|
1561
|
+
# @example Basic example
|
1562
|
+
# require "google/cloud/deploy/v1"
|
1563
|
+
#
|
1564
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1565
|
+
# client = Google::Cloud::Deploy::V1::CloudDeploy::Rest::Client.new
|
1566
|
+
#
|
1567
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1568
|
+
# request = Google::Cloud::Deploy::V1::GetCustomTargetTypeRequest.new
|
1569
|
+
#
|
1570
|
+
# # Call the get_custom_target_type method.
|
1571
|
+
# result = client.get_custom_target_type request
|
1572
|
+
#
|
1573
|
+
# # The returned object is of type Google::Cloud::Deploy::V1::CustomTargetType.
|
1574
|
+
# p result
|
1575
|
+
#
|
1576
|
+
def get_custom_target_type request, options = nil
|
1577
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1578
|
+
|
1579
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::GetCustomTargetTypeRequest
|
1580
|
+
|
1581
|
+
# Converts hash and nil to an options object
|
1582
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1583
|
+
|
1584
|
+
# Customize the options with defaults
|
1585
|
+
call_metadata = @config.rpcs.get_custom_target_type.metadata.to_h
|
1586
|
+
|
1587
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1588
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1589
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1590
|
+
gapic_version: ::Google::Cloud::Deploy::V1::VERSION,
|
1591
|
+
transports_version_send: [:rest]
|
1592
|
+
|
1593
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1594
|
+
|
1595
|
+
options.apply_defaults timeout: @config.rpcs.get_custom_target_type.timeout,
|
1596
|
+
metadata: call_metadata,
|
1597
|
+
retry_policy: @config.rpcs.get_custom_target_type.retry_policy
|
1598
|
+
|
1599
|
+
options.apply_defaults timeout: @config.timeout,
|
1600
|
+
metadata: @config.metadata,
|
1601
|
+
retry_policy: @config.retry_policy
|
1602
|
+
|
1603
|
+
@cloud_deploy_stub.get_custom_target_type request, options do |result, operation|
|
1604
|
+
yield result, operation if block_given?
|
1605
|
+
return result
|
1606
|
+
end
|
1607
|
+
rescue ::Gapic::Rest::Error => e
|
1608
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1609
|
+
end
|
1610
|
+
|
1611
|
+
##
|
1612
|
+
# Creates a new CustomTargetType in a given project and location.
|
1613
|
+
#
|
1614
|
+
# @overload create_custom_target_type(request, options = nil)
|
1615
|
+
# Pass arguments to `create_custom_target_type` via a request object, either of type
|
1616
|
+
# {::Google::Cloud::Deploy::V1::CreateCustomTargetTypeRequest} or an equivalent Hash.
|
1617
|
+
#
|
1618
|
+
# @param request [::Google::Cloud::Deploy::V1::CreateCustomTargetTypeRequest, ::Hash]
|
1619
|
+
# A request object representing the call parameters. Required. To specify no
|
1620
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1621
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1622
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1623
|
+
#
|
1624
|
+
# @overload create_custom_target_type(parent: nil, custom_target_type_id: nil, custom_target_type: nil, request_id: nil, validate_only: nil)
|
1625
|
+
# Pass arguments to `create_custom_target_type` via keyword arguments. Note that at
|
1626
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1627
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1628
|
+
#
|
1629
|
+
# @param parent [::String]
|
1630
|
+
# Required. The parent collection in which the `CustomTargetType` should be
|
1631
|
+
# created in. Format should be
|
1632
|
+
# `projects/{project_id}/locations/{location_name}`.
|
1633
|
+
# @param custom_target_type_id [::String]
|
1634
|
+
# Required. ID of the `CustomTargetType`.
|
1635
|
+
# @param custom_target_type [::Google::Cloud::Deploy::V1::CustomTargetType, ::Hash]
|
1636
|
+
# Required. The `CustomTargetType` to create.
|
1637
|
+
# @param request_id [::String]
|
1638
|
+
# Optional. A request ID to identify requests. Specify a unique request ID
|
1639
|
+
# so that if you must retry your request, the server will know to ignore
|
1640
|
+
# the request if it has already been completed. The server will guarantee
|
1641
|
+
# that for at least 60 minutes since the first request.
|
1642
|
+
#
|
1643
|
+
# For example, consider a situation where you make an initial request and the
|
1644
|
+
# request times out. If you make the request again with the same request ID,
|
1645
|
+
# the server can check if original operation with the same request ID was
|
1646
|
+
# received, and if so, will ignore the second request. This prevents clients
|
1647
|
+
# from accidentally creating duplicate commitments.
|
1648
|
+
#
|
1649
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
1650
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
1651
|
+
# @param validate_only [::Boolean]
|
1652
|
+
# Optional. If set to true, the request is validated and the user is provided
|
1653
|
+
# with an expected result, but no actual change is made.
|
1654
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1655
|
+
# @yieldparam result [::Gapic::Operation]
|
1656
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1657
|
+
#
|
1658
|
+
# @return [::Gapic::Operation]
|
1659
|
+
#
|
1660
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1661
|
+
#
|
1662
|
+
# @example Basic example
|
1663
|
+
# require "google/cloud/deploy/v1"
|
1664
|
+
#
|
1665
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1666
|
+
# client = Google::Cloud::Deploy::V1::CloudDeploy::Rest::Client.new
|
1667
|
+
#
|
1668
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1669
|
+
# request = Google::Cloud::Deploy::V1::CreateCustomTargetTypeRequest.new
|
1670
|
+
#
|
1671
|
+
# # Call the create_custom_target_type method.
|
1672
|
+
# result = client.create_custom_target_type request
|
1673
|
+
#
|
1674
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1675
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1676
|
+
# # Here is how to wait for a response.
|
1677
|
+
# result.wait_until_done! timeout: 60
|
1678
|
+
# if result.response?
|
1679
|
+
# p result.response
|
1680
|
+
# else
|
1681
|
+
# puts "No response received."
|
1682
|
+
# end
|
1683
|
+
#
|
1684
|
+
def create_custom_target_type request, options = nil
|
1685
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1686
|
+
|
1687
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::CreateCustomTargetTypeRequest
|
1688
|
+
|
1689
|
+
# Converts hash and nil to an options object
|
1690
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1691
|
+
|
1692
|
+
# Customize the options with defaults
|
1693
|
+
call_metadata = @config.rpcs.create_custom_target_type.metadata.to_h
|
1694
|
+
|
1695
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1696
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1697
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1698
|
+
gapic_version: ::Google::Cloud::Deploy::V1::VERSION,
|
1699
|
+
transports_version_send: [:rest]
|
1700
|
+
|
1701
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1702
|
+
|
1703
|
+
options.apply_defaults timeout: @config.rpcs.create_custom_target_type.timeout,
|
1704
|
+
metadata: call_metadata,
|
1705
|
+
retry_policy: @config.rpcs.create_custom_target_type.retry_policy
|
1706
|
+
|
1707
|
+
options.apply_defaults timeout: @config.timeout,
|
1708
|
+
metadata: @config.metadata,
|
1709
|
+
retry_policy: @config.retry_policy
|
1710
|
+
|
1711
|
+
@cloud_deploy_stub.create_custom_target_type request, options do |result, operation|
|
1712
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1713
|
+
yield result, operation if block_given?
|
1714
|
+
return result
|
1715
|
+
end
|
1716
|
+
rescue ::Gapic::Rest::Error => e
|
1717
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1718
|
+
end
|
1719
|
+
|
1720
|
+
##
|
1721
|
+
# Updates a single CustomTargetType.
|
1722
|
+
#
|
1723
|
+
# @overload update_custom_target_type(request, options = nil)
|
1724
|
+
# Pass arguments to `update_custom_target_type` via a request object, either of type
|
1725
|
+
# {::Google::Cloud::Deploy::V1::UpdateCustomTargetTypeRequest} or an equivalent Hash.
|
1726
|
+
#
|
1727
|
+
# @param request [::Google::Cloud::Deploy::V1::UpdateCustomTargetTypeRequest, ::Hash]
|
1728
|
+
# A request object representing the call parameters. Required. To specify no
|
1729
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1730
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1731
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1732
|
+
#
|
1733
|
+
# @overload update_custom_target_type(update_mask: nil, custom_target_type: nil, request_id: nil, allow_missing: nil, validate_only: nil)
|
1734
|
+
# Pass arguments to `update_custom_target_type` via keyword arguments. Note that at
|
1735
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1736
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1737
|
+
#
|
1738
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
1739
|
+
# Required. Field mask is used to specify the fields to be overwritten in the
|
1740
|
+
# `CustomTargetType` resource by the update.
|
1741
|
+
# The fields specified in the update_mask are relative to the resource, not
|
1742
|
+
# the full request. A field will be overwritten if it is in the mask. If the
|
1743
|
+
# user does not provide a mask then all fields will be overwritten.
|
1744
|
+
# @param custom_target_type [::Google::Cloud::Deploy::V1::CustomTargetType, ::Hash]
|
1745
|
+
# Required. The `CustomTargetType` to update.
|
1746
|
+
# @param request_id [::String]
|
1747
|
+
# Optional. A request ID to identify requests. Specify a unique request ID
|
1748
|
+
# so that if you must retry your request, the server will know to ignore
|
1749
|
+
# the request if it has already been completed. The server will guarantee
|
1750
|
+
# that for at least 60 minutes since the first request.
|
1751
|
+
#
|
1752
|
+
# For example, consider a situation where you make an initial request and the
|
1753
|
+
# request times out. If you make the request again with the same request ID,
|
1754
|
+
# the server can check if original operation with the same request ID was
|
1755
|
+
# received, and if so, will ignore the second request. This prevents clients
|
1756
|
+
# from accidentally creating duplicate commitments.
|
1757
|
+
#
|
1758
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
1759
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
1760
|
+
# @param allow_missing [::Boolean]
|
1761
|
+
# Optional. If set to true, updating a `CustomTargetType` that does not exist
|
1762
|
+
# will result in the creation of a new `CustomTargetType`.
|
1763
|
+
# @param validate_only [::Boolean]
|
1764
|
+
# Optional. If set to true, the request is validated and the user is provided
|
1765
|
+
# with an expected result, but no actual change is made.
|
1766
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1767
|
+
# @yieldparam result [::Gapic::Operation]
|
1768
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1769
|
+
#
|
1770
|
+
# @return [::Gapic::Operation]
|
1771
|
+
#
|
1772
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1773
|
+
#
|
1774
|
+
# @example Basic example
|
1775
|
+
# require "google/cloud/deploy/v1"
|
1776
|
+
#
|
1777
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1778
|
+
# client = Google::Cloud::Deploy::V1::CloudDeploy::Rest::Client.new
|
1779
|
+
#
|
1780
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1781
|
+
# request = Google::Cloud::Deploy::V1::UpdateCustomTargetTypeRequest.new
|
1782
|
+
#
|
1783
|
+
# # Call the update_custom_target_type method.
|
1784
|
+
# result = client.update_custom_target_type request
|
1785
|
+
#
|
1786
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1787
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1788
|
+
# # Here is how to wait for a response.
|
1789
|
+
# result.wait_until_done! timeout: 60
|
1790
|
+
# if result.response?
|
1791
|
+
# p result.response
|
1792
|
+
# else
|
1793
|
+
# puts "No response received."
|
1794
|
+
# end
|
1795
|
+
#
|
1796
|
+
def update_custom_target_type request, options = nil
|
1797
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1798
|
+
|
1799
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::UpdateCustomTargetTypeRequest
|
1800
|
+
|
1801
|
+
# Converts hash and nil to an options object
|
1802
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1803
|
+
|
1804
|
+
# Customize the options with defaults
|
1805
|
+
call_metadata = @config.rpcs.update_custom_target_type.metadata.to_h
|
1806
|
+
|
1807
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1808
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1809
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1810
|
+
gapic_version: ::Google::Cloud::Deploy::V1::VERSION,
|
1811
|
+
transports_version_send: [:rest]
|
1812
|
+
|
1813
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1814
|
+
|
1815
|
+
options.apply_defaults timeout: @config.rpcs.update_custom_target_type.timeout,
|
1816
|
+
metadata: call_metadata,
|
1817
|
+
retry_policy: @config.rpcs.update_custom_target_type.retry_policy
|
1818
|
+
|
1819
|
+
options.apply_defaults timeout: @config.timeout,
|
1820
|
+
metadata: @config.metadata,
|
1821
|
+
retry_policy: @config.retry_policy
|
1822
|
+
|
1823
|
+
@cloud_deploy_stub.update_custom_target_type request, options do |result, operation|
|
1824
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1825
|
+
yield result, operation if block_given?
|
1826
|
+
return result
|
1827
|
+
end
|
1828
|
+
rescue ::Gapic::Rest::Error => e
|
1829
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1830
|
+
end
|
1831
|
+
|
1832
|
+
##
|
1833
|
+
# Deletes a single CustomTargetType.
|
1834
|
+
#
|
1835
|
+
# @overload delete_custom_target_type(request, options = nil)
|
1836
|
+
# Pass arguments to `delete_custom_target_type` via a request object, either of type
|
1837
|
+
# {::Google::Cloud::Deploy::V1::DeleteCustomTargetTypeRequest} or an equivalent Hash.
|
1838
|
+
#
|
1839
|
+
# @param request [::Google::Cloud::Deploy::V1::DeleteCustomTargetTypeRequest, ::Hash]
|
1840
|
+
# A request object representing the call parameters. Required. To specify no
|
1841
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1842
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1843
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1844
|
+
#
|
1845
|
+
# @overload delete_custom_target_type(name: nil, request_id: nil, allow_missing: nil, validate_only: nil, etag: nil)
|
1846
|
+
# Pass arguments to `delete_custom_target_type` via keyword arguments. Note that at
|
1847
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1848
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1849
|
+
#
|
1850
|
+
# @param name [::String]
|
1851
|
+
# Required. The name of the `CustomTargetType` to delete. Format must be
|
1852
|
+
# `projects/{project_id}/locations/{location_name}/customTargetTypes/{custom_target_type}`.
|
1853
|
+
# @param request_id [::String]
|
1854
|
+
# Optional. A request ID to identify requests. Specify a unique request ID
|
1855
|
+
# so that if you must retry your request, the server will know to ignore
|
1856
|
+
# the request if it has already been completed. The server will guarantee
|
1857
|
+
# that for at least 60 minutes after the first request.
|
1858
|
+
#
|
1859
|
+
# For example, consider a situation where you make an initial request and the
|
1860
|
+
# request times out. If you make the request again with the same request ID,
|
1861
|
+
# the server can check if original operation with the same request ID was
|
1862
|
+
# received, and if so, will ignore the second request. This prevents clients
|
1863
|
+
# from accidentally creating duplicate commitments.
|
1864
|
+
#
|
1865
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
1866
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
1867
|
+
# @param allow_missing [::Boolean]
|
1868
|
+
# Optional. If set to true, then deleting an already deleted or non-existing
|
1869
|
+
# `CustomTargetType` will succeed.
|
1870
|
+
# @param validate_only [::Boolean]
|
1871
|
+
# Optional. If set to true, the request is validated but no actual change is
|
1872
|
+
# made.
|
1873
|
+
# @param etag [::String]
|
1874
|
+
# Optional. This checksum is computed by the server based on the value of
|
1875
|
+
# other fields, and may be sent on update and delete requests to ensure the
|
1876
|
+
# client has an up-to-date value before proceeding.
|
1877
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1878
|
+
# @yieldparam result [::Gapic::Operation]
|
1879
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1880
|
+
#
|
1881
|
+
# @return [::Gapic::Operation]
|
1882
|
+
#
|
1883
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1884
|
+
#
|
1885
|
+
# @example Basic example
|
1886
|
+
# require "google/cloud/deploy/v1"
|
1887
|
+
#
|
1888
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1889
|
+
# client = Google::Cloud::Deploy::V1::CloudDeploy::Rest::Client.new
|
1890
|
+
#
|
1891
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1892
|
+
# request = Google::Cloud::Deploy::V1::DeleteCustomTargetTypeRequest.new
|
1893
|
+
#
|
1894
|
+
# # Call the delete_custom_target_type method.
|
1895
|
+
# result = client.delete_custom_target_type request
|
1896
|
+
#
|
1897
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1898
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1899
|
+
# # Here is how to wait for a response.
|
1900
|
+
# result.wait_until_done! timeout: 60
|
1901
|
+
# if result.response?
|
1902
|
+
# p result.response
|
1903
|
+
# else
|
1904
|
+
# puts "No response received."
|
1905
|
+
# end
|
1906
|
+
#
|
1907
|
+
def delete_custom_target_type request, options = nil
|
1908
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1909
|
+
|
1910
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Deploy::V1::DeleteCustomTargetTypeRequest
|
1911
|
+
|
1912
|
+
# Converts hash and nil to an options object
|
1913
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1914
|
+
|
1915
|
+
# Customize the options with defaults
|
1916
|
+
call_metadata = @config.rpcs.delete_custom_target_type.metadata.to_h
|
1917
|
+
|
1918
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1919
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1920
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1921
|
+
gapic_version: ::Google::Cloud::Deploy::V1::VERSION,
|
1922
|
+
transports_version_send: [:rest]
|
1923
|
+
|
1924
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1925
|
+
|
1926
|
+
options.apply_defaults timeout: @config.rpcs.delete_custom_target_type.timeout,
|
1927
|
+
metadata: call_metadata,
|
1928
|
+
retry_policy: @config.rpcs.delete_custom_target_type.retry_policy
|
1929
|
+
|
1930
|
+
options.apply_defaults timeout: @config.timeout,
|
1931
|
+
metadata: @config.metadata,
|
1932
|
+
retry_policy: @config.retry_policy
|
1933
|
+
|
1934
|
+
@cloud_deploy_stub.delete_custom_target_type request, options do |result, operation|
|
1935
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1936
|
+
yield result, operation if block_given?
|
1937
|
+
return result
|
1938
|
+
end
|
1939
|
+
rescue ::Gapic::Rest::Error => e
|
1940
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1941
|
+
end
|
1942
|
+
|
1416
1943
|
##
|
1417
1944
|
# Lists Releases in a given project and location.
|
1418
1945
|
#
|
@@ -3243,8 +3770,8 @@ module Google
|
|
3243
3770
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
3244
3771
|
#
|
3245
3772
|
# @param parent [::String]
|
3246
|
-
# Required. The parent
|
3247
|
-
# must be
|
3773
|
+
# Required. The parent `Delivery Pipeline`, which owns this collection of
|
3774
|
+
# automations. Format must be
|
3248
3775
|
# `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
|
3249
3776
|
# @param page_size [::Integer]
|
3250
3777
|
# The maximum number of automations to return. The service may return
|
@@ -3422,8 +3949,8 @@ module Google
|
|
3422
3949
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
3423
3950
|
#
|
3424
3951
|
# @param parent [::String]
|
3425
|
-
# Required. The parent
|
3426
|
-
# must be
|
3952
|
+
# Required. The parent `Delivery Pipeline`, which owns this collection of
|
3953
|
+
# automationRuns. Format must be
|
3427
3954
|
# `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}`.
|
3428
3955
|
# @param page_size [::Integer]
|
3429
3956
|
# The maximum number of automationRuns to return. The service may return
|
@@ -3773,6 +4300,31 @@ module Google
|
|
3773
4300
|
#
|
3774
4301
|
attr_reader :delete_target
|
3775
4302
|
##
|
4303
|
+
# RPC-specific configuration for `list_custom_target_types`
|
4304
|
+
# @return [::Gapic::Config::Method]
|
4305
|
+
#
|
4306
|
+
attr_reader :list_custom_target_types
|
4307
|
+
##
|
4308
|
+
# RPC-specific configuration for `get_custom_target_type`
|
4309
|
+
# @return [::Gapic::Config::Method]
|
4310
|
+
#
|
4311
|
+
attr_reader :get_custom_target_type
|
4312
|
+
##
|
4313
|
+
# RPC-specific configuration for `create_custom_target_type`
|
4314
|
+
# @return [::Gapic::Config::Method]
|
4315
|
+
#
|
4316
|
+
attr_reader :create_custom_target_type
|
4317
|
+
##
|
4318
|
+
# RPC-specific configuration for `update_custom_target_type`
|
4319
|
+
# @return [::Gapic::Config::Method]
|
4320
|
+
#
|
4321
|
+
attr_reader :update_custom_target_type
|
4322
|
+
##
|
4323
|
+
# RPC-specific configuration for `delete_custom_target_type`
|
4324
|
+
# @return [::Gapic::Config::Method]
|
4325
|
+
#
|
4326
|
+
attr_reader :delete_custom_target_type
|
4327
|
+
##
|
3776
4328
|
# RPC-specific configuration for `list_releases`
|
3777
4329
|
# @return [::Gapic::Config::Method]
|
3778
4330
|
#
|
@@ -3917,6 +4469,16 @@ module Google
|
|
3917
4469
|
@update_target = ::Gapic::Config::Method.new update_target_config
|
3918
4470
|
delete_target_config = parent_rpcs.delete_target if parent_rpcs.respond_to? :delete_target
|
3919
4471
|
@delete_target = ::Gapic::Config::Method.new delete_target_config
|
4472
|
+
list_custom_target_types_config = parent_rpcs.list_custom_target_types if parent_rpcs.respond_to? :list_custom_target_types
|
4473
|
+
@list_custom_target_types = ::Gapic::Config::Method.new list_custom_target_types_config
|
4474
|
+
get_custom_target_type_config = parent_rpcs.get_custom_target_type if parent_rpcs.respond_to? :get_custom_target_type
|
4475
|
+
@get_custom_target_type = ::Gapic::Config::Method.new get_custom_target_type_config
|
4476
|
+
create_custom_target_type_config = parent_rpcs.create_custom_target_type if parent_rpcs.respond_to? :create_custom_target_type
|
4477
|
+
@create_custom_target_type = ::Gapic::Config::Method.new create_custom_target_type_config
|
4478
|
+
update_custom_target_type_config = parent_rpcs.update_custom_target_type if parent_rpcs.respond_to? :update_custom_target_type
|
4479
|
+
@update_custom_target_type = ::Gapic::Config::Method.new update_custom_target_type_config
|
4480
|
+
delete_custom_target_type_config = parent_rpcs.delete_custom_target_type if parent_rpcs.respond_to? :delete_custom_target_type
|
4481
|
+
@delete_custom_target_type = ::Gapic::Config::Method.new delete_custom_target_type_config
|
3920
4482
|
list_releases_config = parent_rpcs.list_releases if parent_rpcs.respond_to? :list_releases
|
3921
4483
|
@list_releases = ::Gapic::Config::Method.new list_releases_config
|
3922
4484
|
get_release_config = parent_rpcs.get_release if parent_rpcs.respond_to? :get_release
|