Skip to content

list_imports async

list_imports(
    *,
    config_overrides: Optional[AsyncCloudFormationClientConfig] = None,
    export_name: Optional[ExportName] = None,
    next_token: Optional[NextToken] = None,
) -> ListImportsOutput

Lists all stacks that are importing an exported output value. To modify or remove an exported output value, first use this action to see which stacks are using it. To see the exported output values in your account, see ListExports.

For more information about importing an exported output value, see the Fn::ImportValue function.

Parameters:

  • export_name (Optional[ExportName], default: None ) –

    The name of the exported output value. CloudFormation returns the stack names that are importing this value.

  • next_token (Optional[NextToken], default: None ) –

    The token for the next set of items to return. (You received this token from a previous call.)

Raises:

Source code in docs_src/capo_cloudformation/_services/async_cloud_formation.py
async def list_imports(
    self,
    *,
    config_overrides: Optional[AsyncCloudFormationClientConfig] = None,
    export_name: Optional[
        "capo_cloudformation.types.export_name.ExportName"
    ] = None,
    next_token: Optional["capo_cloudformation.types.next_token.NextToken"] = None,
) -> "capo_cloudformation.types.list_imports_output.ListImportsOutput":
    """<p>Lists all stacks that are importing an exported output value. To modify or remove an exported output value, first use this action to see which stacks are using it. To see the exported output values in your account, see <a>ListExports</a>.</p> <p>For more information about importing an exported output value, see the <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-importvalue.html">Fn::ImportValue</a> function.</p>

    Args:
        export_name: <p>The name of the exported output value. CloudFormation returns the stack names that are importing this value.</p>
        next_token: <p>The token for the next set of items to return. (You received this token from a previous call.)</p>

    Raises:
        capo_cloudformation.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_cloudformation.types.list_imports_input.ListImportsInput]",
    ) -> AsyncOperationResponse[
        "capo_cloudformation.types.list_imports_output.ListImportsOutput"
    ]:
        import capo_cloudformation._operations.cloud_formation.list_imports

        (
            output,
            http_response,
        ) = await capo_cloudformation._operations.cloud_formation.list_imports.async_list_imports(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListImports")
    )
    input_: capo_cloudformation.types.list_imports_input.ListImportsInput = {}
    if export_name is not None:
        input_["export_name"] = export_name
    if next_token is not None:
        input_["next_token"] = next_token

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