lib/google/apis/clouddeploy_v1/service.rb in google-apis-clouddeploy_v1-0.49.0 vs lib/google/apis/clouddeploy_v1/service.rb in google-apis-clouddeploy_v1-0.50.0

- old
+ new

@@ -1309,10 +1309,13 @@ # @param [String] parent # Required. The parent collection in which the `Release` is created. The format # is `projects/`project_id`/locations/`location_name`/deliveryPipelines/` # pipeline_name``. # @param [Google::Apis::ClouddeployV1::Release] release_object + # @param [Array<String>, String] override_deploy_policy + # Optional. Deploy policies to override. Format is `projects/`project`/locations/ + # `location`/deployPolicies/`deployPolicy``. # @param [String] release_id # Required. ID of the `Release`. # @param [String] request_id # Optional. A request ID to identify requests. Specify a unique request ID so # that if you must retry your request, the server knows to ignore the request if @@ -1342,17 +1345,18 @@ # @return [Google::Apis::ClouddeployV1::Operation] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_project_location_delivery_pipeline_release(parent, release_object = nil, release_id: nil, request_id: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block) + def create_project_location_delivery_pipeline_release(parent, release_object = nil, override_deploy_policy: nil, release_id: nil, request_id: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+parent}/releases', options) command.request_representation = Google::Apis::ClouddeployV1::Release::Representation command.request_object = release_object command.response_representation = Google::Apis::ClouddeployV1::Operation::Representation command.response_class = Google::Apis::ClouddeployV1::Operation command.params['parent'] = parent unless parent.nil? + command.query['overrideDeployPolicy'] = override_deploy_policy unless override_deploy_policy.nil? command.query['releaseId'] = release_id unless release_id.nil? command.query['requestId'] = request_id unless request_id.nil? command.query['validateOnly'] = validate_only unless validate_only.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? @@ -1550,10 +1554,13 @@ # @param [String] parent # Required. The parent collection in which the `Rollout` must be created. The # format is `projects/`project_id`/locations/`location_name`/deliveryPipelines/` # pipeline_name`/releases/`release_name``. # @param [Google::Apis::ClouddeployV1::Rollout] rollout_object + # @param [Array<String>, String] override_deploy_policy + # Optional. Deploy policies to override. Format is `projects/`project`/locations/ + # `location`/deployPolicies/`deployPolicy``. # @param [String] request_id # Optional. A request ID to identify requests. Specify a unique request ID so # that if you must retry your request, the server knows to ignore the request if # it has already been completed. The server guarantees that for at least 60 # minutes after the first request. For example, consider a situation where you @@ -1586,17 +1593,18 @@ # @return [Google::Apis::ClouddeployV1::Operation] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_project_location_delivery_pipeline_release_rollout(parent, rollout_object = nil, request_id: nil, rollout_id: nil, starting_phase_id: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block) + def create_project_location_delivery_pipeline_release_rollout(parent, rollout_object = nil, override_deploy_policy: nil, request_id: nil, rollout_id: nil, starting_phase_id: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+parent}/rollouts', options) command.request_representation = Google::Apis::ClouddeployV1::Rollout::Representation command.request_object = rollout_object command.response_representation = Google::Apis::ClouddeployV1::Operation::Representation command.response_class = Google::Apis::ClouddeployV1::Operation command.params['parent'] = parent unless parent.nil? + command.query['overrideDeployPolicy'] = override_deploy_policy unless override_deploy_policy.nil? command.query['requestId'] = request_id unless request_id.nil? command.query['rolloutId'] = rollout_id unless rollout_id.nil? command.query['startingPhaseId'] = starting_phase_id unless starting_phase_id.nil? command.query['validateOnly'] = validate_only unless validate_only.nil? command.query['fields'] = fields unless fields.nil? @@ -1863,9 +1871,259 @@ command.request_representation = Google::Apis::ClouddeployV1::TerminateJobRunRequest::Representation command.request_object = terminate_job_run_request_object command.response_representation = Google::Apis::ClouddeployV1::TerminateJobRunResponse::Representation command.response_class = Google::Apis::ClouddeployV1::TerminateJobRunResponse command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates a new DeployPolicy in a given project and location. + # @param [String] parent + # Required. The parent collection in which the `DeployPolicy` must be created. + # The format is `projects/`project_id`/locations/`location_name``. + # @param [Google::Apis::ClouddeployV1::DeployPolicy] deploy_policy_object + # @param [String] deploy_policy_id + # Required. ID of the `DeployPolicy`. + # @param [String] request_id + # Optional. A request ID to identify requests. Specify a unique request ID so + # that if you must retry your request, the server knows to ignore the request if + # it has already been completed. The server guarantees that for at least 60 + # minutes after the first request. For example, consider a situation where you + # make an initial request and the request times out. If you make the request + # again with the same request ID, the server can check if original operation + # with the same request ID was received, and if so, will ignore the second + # request. This prevents clients from accidentally creating duplicate + # commitments. The request ID must be a valid UUID with the exception that zero + # UUID is not supported (00000000-0000-0000-0000-000000000000). + # @param [Boolean] validate_only + # Optional. If set to true, the request is validated and the user is provided + # with an expected result, but no actual change is made. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ClouddeployV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClouddeployV1::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_project_location_deploy_policy(parent, deploy_policy_object = nil, deploy_policy_id: nil, request_id: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+parent}/deployPolicies', options) + command.request_representation = Google::Apis::ClouddeployV1::DeployPolicy::Representation + command.request_object = deploy_policy_object + command.response_representation = Google::Apis::ClouddeployV1::Operation::Representation + command.response_class = Google::Apis::ClouddeployV1::Operation + command.params['parent'] = parent unless parent.nil? + command.query['deployPolicyId'] = deploy_policy_id unless deploy_policy_id.nil? + command.query['requestId'] = request_id unless request_id.nil? + command.query['validateOnly'] = validate_only unless validate_only.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a single DeployPolicy. + # @param [String] name + # Required. The name of the `DeployPolicy` to delete. The format is `projects/` + # project_id`/locations/`location_name`/deployPolicies/`deploy_policy_name``. + # @param [Boolean] allow_missing + # Optional. If set to true, then deleting an already deleted or non-existing ` + # DeployPolicy` will succeed. + # @param [String] etag + # Optional. This checksum is computed by the server based on the value of other + # fields, and may be sent on update and delete requests to ensure the client has + # an up-to-date value before proceeding. + # @param [String] request_id + # Optional. A request ID to identify requests. Specify a unique request ID so + # that if you must retry your request, the server knows to ignore the request if + # it has already been completed. The server guarantees that for at least 60 + # minutes after the first request. For example, consider a situation where you + # make an initial request and the request times out. If you make the request + # again with the same request ID, the server can check if original operation + # with the same request ID was received, and if so, will ignore the second + # request. This prevents clients from accidentally creating duplicate + # commitments. The request ID must be a valid UUID with the exception that zero + # UUID is not supported (00000000-0000-0000-0000-000000000000). + # @param [Boolean] validate_only + # Optional. If set, validate the request and preview the review, but do not + # actually post it. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ClouddeployV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClouddeployV1::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_project_location_deploy_policy(name, allow_missing: nil, etag: nil, request_id: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/{+name}', options) + command.response_representation = Google::Apis::ClouddeployV1::Operation::Representation + command.response_class = Google::Apis::ClouddeployV1::Operation + command.params['name'] = name unless name.nil? + command.query['allowMissing'] = allow_missing unless allow_missing.nil? + command.query['etag'] = etag unless etag.nil? + command.query['requestId'] = request_id unless request_id.nil? + command.query['validateOnly'] = validate_only unless validate_only.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets details of a single DeployPolicy. + # @param [String] name + # Required. Name of the `DeployPolicy`. Format must be `projects/`project_id`/ + # locations/`location_name`/deployPolicies/`deploy_policy_name``. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ClouddeployV1::DeployPolicy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClouddeployV1::DeployPolicy] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_location_deploy_policy(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+name}', options) + command.response_representation = Google::Apis::ClouddeployV1::DeployPolicy::Representation + command.response_class = Google::Apis::ClouddeployV1::DeployPolicy + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists DeployPolicies in a given project and location. + # @param [String] parent + # Required. The parent, which owns this collection of deploy policies. Format + # must be `projects/`project_id`/locations/`location_name``. + # @param [String] filter + # Filter deploy policies to be returned. See https://google.aip.dev/160 for more + # details. All fields can be used in the filter. + # @param [String] order_by + # Field to sort by. See https://google.aip.dev/132#ordering for more details. + # @param [Fixnum] page_size + # The maximum number of deploy policies to return. The service may return fewer + # than this value. If unspecified, at most 50 deploy policies will be returned. + # The maximum value is 1000; values above 1000 will be set to 1000. + # @param [String] page_token + # A page token, received from a previous `ListDeployPolicies` call. Provide this + # to retrieve the subsequent page. When paginating, all other provided + # parameters match the call that provided the page token. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ClouddeployV1::ListDeployPoliciesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClouddeployV1::ListDeployPoliciesResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_location_deploy_policies(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+parent}/deployPolicies', options) + command.response_representation = Google::Apis::ClouddeployV1::ListDeployPoliciesResponse::Representation + command.response_class = Google::Apis::ClouddeployV1::ListDeployPoliciesResponse + command.params['parent'] = parent unless parent.nil? + command.query['filter'] = filter unless filter.nil? + command.query['orderBy'] = order_by unless order_by.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Updates the parameters of a single DeployPolicy. + # @param [String] name + # Output only. Name of the `DeployPolicy`. Format is `projects/`project`/ + # locations/`location`/deployPolicies/`deployPolicy``. The `deployPolicy` + # component must match `[a-z]([a-z0-9-]`0,61`[a-z0-9])?` + # @param [Google::Apis::ClouddeployV1::DeployPolicy] deploy_policy_object + # @param [Boolean] allow_missing + # Optional. If set to true, updating a `DeployPolicy` that does not exist will + # result in the creation of a new `DeployPolicy`. + # @param [String] request_id + # Optional. A request ID to identify requests. Specify a unique request ID so + # that if you must retry your request, the server knows to ignore the request if + # it has already been completed. The server guarantees that for at least 60 + # minutes after the first request. For example, consider a situation where you + # make an initial request and the request times out. If you make the request + # again with the same request ID, the server can check if original operation + # with the same request ID was received, and if so, will ignore the second + # request. This prevents clients from accidentally creating duplicate + # commitments. The request ID must be a valid UUID with the exception that zero + # UUID is not supported (00000000-0000-0000-0000-000000000000). + # @param [String] update_mask + # Required. Field mask is used to specify the fields to be overwritten by the + # update in the `DeployPolicy` resource. The fields specified in the update_mask + # are relative to the resource, not the full request. A field will be + # overwritten if it's in the mask. If the user doesn't provide a mask then all + # fields are overwritten. + # @param [Boolean] validate_only + # Optional. If set to true, the request is validated and the user is provided + # with an expected result, but no actual change is made. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ClouddeployV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClouddeployV1::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def patch_project_location_deploy_policy(name, deploy_policy_object = nil, allow_missing: nil, request_id: nil, update_mask: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:patch, 'v1/{+name}', options) + command.request_representation = Google::Apis::ClouddeployV1::DeployPolicy::Representation + command.request_object = deploy_policy_object + command.response_representation = Google::Apis::ClouddeployV1::Operation::Representation + command.response_class = Google::Apis::ClouddeployV1::Operation + command.params['name'] = name unless name.nil? + command.query['allowMissing'] = allow_missing unless allow_missing.nil? + command.query['requestId'] = request_id unless request_id.nil? + command.query['updateMask'] = update_mask unless update_mask.nil? + command.query['validateOnly'] = validate_only unless validate_only.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end