Skip to content

tag_resource

tag_resource(
    resource_arn: String,
    tags: TagMap,
    *,
    config_overrides: Optional[signerClientConfig] = None,
) -> TagResourceResponse

Adds one or more tags to a signing profile. Tags are labels that you can use to identify and organize your AWS resources. Each tag consists of a key and an optional value. To specify the signing profile, use its Amazon Resource Name (ARN). To specify the tag, use a key-value pair.

Parameters:

  • resource_arn (String) –

    The Amazon Resource Name (ARN) for the signing profile.

  • tags (TagMap) –

    One or more tags to be associated with the signing profile.

Raises:

Source code in docs_src/capo_signer/_services/signer.py
def tag_resource(
    self,
    resource_arn: "capo_signer.types.string.String",
    tags: "capo_signer.types.tag_map.TagMap",
    *,
    config_overrides: Optional[signerClientConfig] = None,
) -> "capo_signer.types.tag_resource_response.TagResourceResponse":
    """<p>Adds one or more tags to a signing profile. Tags are labels that you can use to identify and organize your AWS resources. Each tag consists of a key and an optional value. To specify the signing profile, use its Amazon Resource Name (ARN). To specify the tag, use a key-value pair.</p>

    Args:
        resource_arn: <p>The Amazon Resource Name (ARN) for the signing profile.</p>
        tags: <p>One or more tags to be associated with the signing profile.</p>

    Raises:
        capo_signer.errors.bad_request_exception.BadRequestException: <p>The request contains invalid parameters for the ARN or tags. This exception also occurs when you call a tagging API on a cancelled signing profile.</p>
        capo_signer.errors.internal_service_error_exception.InternalServiceErrorException: <p>An internal error occurred.</p>
        capo_signer.errors.not_found_exception.NotFoundException: <p>The signing profile was not found.</p>
        capo_signer.errors.too_many_requests_exception.TooManyRequestsException: <p>The allowed number of job-signing requests has been exceeded.</p> <p>This error supersedes the error <code>ThrottlingException</code>.</p>
        capo_signer.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_signer.types.tag_resource_request.TagResourceRequest]",
    ) -> OperationResponse[
        "capo_signer.types.tag_resource_response.TagResourceResponse"
    ]:
        import capo_signer._operations.wallaby_service.tag_resource

        output, http_response = (
            capo_signer._operations.wallaby_service.tag_resource.tag_resource(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("TagResource")
    )
    input_: capo_signer.types.tag_resource_request.TagResourceRequest = {
        "resource_arn": resource_arn,
        "tags": tags,
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output