Skip to content

get_workload_identity_template async

get_workload_identity_template(
    workload_identity_template_arn: arnType,
    *,
    config_overrides: Optional[AsyncIAMClientConfig] = None,
) -> GetWorkloadIdentityTemplateResponse

Retrieves a workload identity template, including its tags, addressed by its own ARN rather than by any name.

The attestation policy is deliberately not returned here. It is read through GetWorkloadIdentityTemplateAttestationPolicy, so a principal that is granted the template read does not thereby learn what the template will attest.

Parameters:

  • workload_identity_template_arn (arnType) –

    The Amazon Resource Name (ARN) of the template to retrieve.

Raises:

  • InvalidInputException –

    The request was rejected because an invalid or out-of-range value was supplied for an input parameter.

  • NoSuchEntityException –

    The request was rejected because it referenced a resource entity that does not exist. The error message describes the resource.

  • ServiceFailureException –

    The request processing has failed because of an unknown error, exception or failure.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_iam/_services/async_iam.py
async def get_workload_identity_template(
    self,
    workload_identity_template_arn: "capo_iam.types.arn_type.arnType",
    *,
    config_overrides: Optional[AsyncIAMClientConfig] = None,
) -> "capo_iam.types.get_workload_identity_template_response.GetWorkloadIdentityTemplateResponse":
    """<p>Retrieves a workload identity template, including its tags, addressed by its own ARN rather than by any name.</p> <p>The attestation policy is deliberately not returned here. It is read through <a href="https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetWorkloadIdentityTemplateAttestationPolicy.html">GetWorkloadIdentityTemplateAttestationPolicy</a>, so a principal that is granted the template read does not thereby learn what the template will attest.</p>

    Args:
        workload_identity_template_arn: <p>The Amazon Resource Name (ARN) of the template to retrieve.</p>

    Raises:
        capo_iam.errors.invalid_input_exception.InvalidInputException: <p>The request was rejected because an invalid or out-of-range value was supplied for an input parameter.</p>
        capo_iam.errors.no_such_entity_exception.NoSuchEntityException: <p>The request was rejected because it referenced a resource entity that does not exist. The error message describes the resource.</p>
        capo_iam.errors.service_failure_exception.ServiceFailureException: <p>The request processing has failed because of an unknown error, exception or failure.</p>
        capo_iam.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_iam.types.get_workload_identity_template_request.GetWorkloadIdentityTemplateRequest]",
    ) -> AsyncOperationResponse[
        "capo_iam.types.get_workload_identity_template_response.GetWorkloadIdentityTemplateResponse"
    ]:
        import capo_iam._operations.aws_identity_management_v20100508.get_workload_identity_template

        (
            output,
            http_response,
        ) = await capo_iam._operations.aws_identity_management_v20100508.get_workload_identity_template.async_get_workload_identity_template(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetWorkloadIdentityTemplate")
    )
    input_: capo_iam.types.get_workload_identity_template_request.GetWorkloadIdentityTemplateRequest = {
        "workload_identity_template_arn": workload_identity_template_arn
    }

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