Skip to content

create_support_permit

create_support_permit(
    permit: Permit,
    name: Name,
    signing_key_info: SigningKeyInfo,
    *,
    config_overrides: Optional[SupportAuthZClientConfig] = None,
    description: Optional[Description] = None,
    support_case_display_id: Optional[SupportCaseDisplayId] = None,
    client_token: Optional[ClientToken] = None,
    tags: Optional[Tags] = None,
) -> CreateSupportPermitOutput

Creates a support permit that authorizes an AWS support operator to perform specified actions on specified resources. The permit is cryptographically signed using a customer-managed AWS KMS key (ECC_NIST_P384, SIGN_VERIFY) to ensure non-repudiation.

Parameters:

  • permit (Permit) –

    The permit definition specifying the actions, resources, and time-window conditions that the support operator is authorized to use.

  • name (Name) –

    A customer-chosen name for the support permit. Must be between 1 and 256 alphanumeric characters.

  • description (Optional[Description], default: None ) –

    A human-readable description of why this permit is being created. Maximum length of 1024 characters.

  • signing_key_info (SigningKeyInfo) –

    The signing key information used to sign the permit. Must reference an AWS KMS key with key usage SIGN_VERIFY and key spec ECC_NIST_P384.

  • support_case_display_id (Optional[SupportCaseDisplayId], default: None ) –

    The display identifier of the AWS Support case associated with this permit.

  • client_token (Optional[ClientToken], default: None ) –

    A unique, case-sensitive identifier to ensure that the operation completes no more than one time. If this token matches a previous request, the service returns the existing permit without creating a duplicate.

  • tags (Optional[Tags], default: None ) –

    The tags to associate with the support permit on creation.

Raises:

Source code in docs_src/capo_supportauthz/_services/support_auth_z.py
def create_support_permit(
    self,
    permit: "capo_supportauthz.types.permit.Permit",
    name: "capo_supportauthz.types.name.Name",
    signing_key_info: "capo_supportauthz.types.signing_key_info.SigningKeyInfo",
    *,
    config_overrides: Optional[SupportAuthZClientConfig] = None,
    description: Optional["capo_supportauthz.types.description.Description"] = None,
    support_case_display_id: Optional[
        "capo_supportauthz.types.support_case_display_id.SupportCaseDisplayId"
    ] = None,
    client_token: Optional[
        "capo_supportauthz.types.client_token.ClientToken"
    ] = None,
    tags: Optional["capo_supportauthz.types.tags.Tags"] = None,
) -> (
    "capo_supportauthz.types.create_support_permit_output.CreateSupportPermitOutput"
):
    """<p>Creates a support permit that authorizes an AWS support operator to perform specified actions on specified resources. The permit is cryptographically signed using a customer-managed AWS KMS key (ECC_NIST_P384, SIGN_VERIFY) to ensure non-repudiation.</p>

    Args:
        permit: <p>The permit definition specifying the actions, resources, and time-window conditions that the support operator is authorized to use.</p>
        name: <p>A customer-chosen name for the support permit. Must be between 1 and 256 alphanumeric characters.</p>
        description: <p>A human-readable description of why this permit is being created. Maximum length of 1024 characters.</p>
        signing_key_info: <p>The signing key information used to sign the permit. Must reference an AWS KMS key with key usage SIGN_VERIFY and key spec ECC_NIST_P384.</p>
        support_case_display_id: <p>The display identifier of the AWS Support case associated with this permit.</p>
        client_token: <p>A unique, case-sensitive identifier to ensure that the operation completes no more than one time. If this token matches a previous request, the service returns the existing permit without creating a duplicate.</p>
        tags: <p>The tags to associate with the support permit on creation.</p>

    Raises:
        capo_supportauthz.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient permissions to perform this operation.</p>
        capo_supportauthz.errors.conflict_exception.ConflictException: <p>The request conflicts with the current state of the resource.</p>
        capo_supportauthz.errors.internal_server_exception.InternalServerException: <p>An internal service error occurred. Try again later.</p>
        capo_supportauthz.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request exceeds a service quota for your account.</p>
        capo_supportauthz.errors.throttling_exception.ThrottlingException: <p>The request rate exceeded the allowed limit. Try again later.</p>
        capo_supportauthz.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the service.</p>
        capo_supportauthz.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_supportauthz.types.create_support_permit_input.CreateSupportPermitInput]",
    ) -> OperationResponse[
        "capo_supportauthz.types.create_support_permit_output.CreateSupportPermitOutput"
    ]:
        import capo_supportauthz._operations.support_auth_z.create_support_permit

        output, http_response = (
            capo_supportauthz._operations.support_auth_z.create_support_permit.create_support_permit(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateSupportPermit")
    )
    input_: capo_supportauthz.types.create_support_permit_input.CreateSupportPermitInput = {
        "permit": permit,
        "name": name,
        "signing_key_info": signing_key_info,
    }
    if description is not None:
        input_["description"] = description
    if support_case_display_id is not None:
        input_["support_case_display_id"] = support_case_display_id
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token
    if tags is not None:
        input_["tags"] = tags

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