Skip to content

add_profile_permission async

add_profile_permission(
    profile_name: ProfileName,
    action: String,
    principal: String,
    statement_id: String,
    *,
    config_overrides: Optional[AsyncsignerClientConfig] = None,
    profile_version: Optional[ProfileVersion] = None,
    revision_id: Optional[String] = None,
) -> AddProfilePermissionResponse

Adds cross-account permissions to a signing profile.

Parameters:

  • profile_name (ProfileName) –

    The human-readable name of the signing profile.

  • profile_version (Optional[ProfileVersion], default: None ) –

    The version of the signing profile.

  • action (String) –

    For cross-account signing. Grant a designated account permission to perform one or more of the following actions. Each action is associated with a specific API's operations. For more information about cross-account signing, see Using cross-account signing with signing profiles in the AWS Signer Developer Guide.

    You can designate the following actions to an account.

    • signer:StartSigningJob. This action isn't supported for container image workflows. For details, see StartSigningJob.

    • signer:SignPayload. This action isn't supported for AWS Lambda workflows. For details, see SignPayload

    • signer:GetSigningProfile. For details, see GetSigningProfile.

    • signer:RevokeSignature. For details, see RevokeSignature.

  • principal (String) –

    The AWS principal receiving cross-account permissions. This may be an IAM role or another AWS account ID.

  • revision_id (Optional[String], default: None ) –

    A unique identifier for the current profile revision.

  • statement_id (String) –

    A unique identifier for the cross-account permission statement.

Raises:

Source code in docs_src/capo_signer/_services/async_signer.py
async def add_profile_permission(
    self,
    profile_name: "capo_signer.types.profile_name.ProfileName",
    action: "capo_signer.types.string.String",
    principal: "capo_signer.types.string.String",
    statement_id: "capo_signer.types.string.String",
    *,
    config_overrides: Optional[AsyncsignerClientConfig] = None,
    profile_version: Optional[
        "capo_signer.types.profile_version.ProfileVersion"
    ] = None,
    revision_id: Optional["capo_signer.types.string.String"] = None,
) -> (
    "capo_signer.types.add_profile_permission_response.AddProfilePermissionResponse"
):
    """<p>Adds cross-account permissions to a signing profile.</p>

    Args:
        profile_name: <p>The human-readable name of the signing profile.</p>
        profile_version: <p>The version of the signing profile.</p>
        action: <p>For cross-account signing. Grant a designated account permission to perform one or more of the following actions. Each action is associated with a specific API's operations. For more information about cross-account signing, see <a href="http://docs.aws.amazon.com/signer/latest/developerguide/signing-profile-cross-account.html">Using cross-account signing with signing profiles</a> in the <i>AWS Signer Developer Guide</i>.</p> <p>You can designate the following actions to an account.</p> <ul> <li> <p> <code>signer:StartSigningJob</code>. This action isn't supported for container image workflows. For details, see <a>StartSigningJob</a>.</p> </li> <li> <p> <code>signer:SignPayload</code>. This action isn't supported for AWS Lambda workflows. For details, see <a>SignPayload</a> </p> </li> <li> <p> <code>signer:GetSigningProfile</code>. For details, see <a>GetSigningProfile</a>.</p> </li> <li> <p> <code>signer:RevokeSignature</code>. For details, see <a>RevokeSignature</a>.</p> </li> </ul>
        principal: <p>The AWS principal receiving cross-account permissions. This may be an IAM role or another AWS account ID.</p>
        revision_id: <p>A unique identifier for the current profile revision.</p>
        statement_id: <p>A unique identifier for the cross-account permission statement.</p>

    Raises:
        capo_signer.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_signer.errors.conflict_exception.ConflictException: <p>The resource encountered a conflicting state.</p>
        capo_signer.errors.internal_service_error_exception.InternalServiceErrorException: <p>An internal error occurred.</p>
        capo_signer.errors.resource_not_found_exception.ResourceNotFoundException: <p>A specified resource could not be found.</p>
        capo_signer.errors.service_limit_exceeded_exception.ServiceLimitExceededException: <p>The client is making a request that exceeds service limits.</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.validation_exception.ValidationException: <p>You signing certificate could not be validated.</p>
        capo_signer.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_signer.types.add_profile_permission_request.AddProfilePermissionRequest]",
    ) -> AsyncOperationResponse[
        "capo_signer.types.add_profile_permission_response.AddProfilePermissionResponse"
    ]:
        import capo_signer._operations.wallaby_service.add_profile_permission

        (
            output,
            http_response,
        ) = await capo_signer._operations.wallaby_service.add_profile_permission.async_add_profile_permission(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("AddProfilePermission")
    )
    input_: capo_signer.types.add_profile_permission_request.AddProfilePermissionRequest = {
        "profile_name": profile_name,
        "action": action,
        "principal": principal,
        "statement_id": statement_id,
    }
    if profile_version is not None:
        input_["profile_version"] = profile_version
    if revision_id is not None:
        input_["revision_id"] = revision_id

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output