Skip to content

describe_vpc_encryption_controls async

describe_vpc_encryption_controls(
    *,
    config_overrides: Optional[AsyncEC2ClientConfig] = None,
    dry_run: Optional[Boolean] = None,
    filters: Optional[FilterList] = None,
    vpc_encryption_control_ids: Optional[VpcEncryptionControlIdList] = None,
    vpc_ids: Optional[VpcIdStringList] = None,
    next_token: Optional[String] = None,
    max_results: Optional[DescribeVpcEncryptionControlsMaxResults] = None,
) -> DescribeVpcEncryptionControlsResult

Describes one or more VPC Encryption Control configurations. VPC Encryption Control enables you to enforce encryption for all data in transit within and between VPCs to meet compliance requirements You can filter the results to return information about specific encryption controls or VPCs.

For more information, see Enforce VPC encryption in transit in the Amazon VPC User Guide.

Parameters:

  • dry_run (Optional[Boolean], default: None ) –

    Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

  • filters (Optional[FilterList], default: None ) –

    The filters to apply to the request.

  • vpc_encryption_control_ids (Optional[VpcEncryptionControlIdList], default: None ) –

    The IDs of the VPC Encryption Control configurations to describe.

  • vpc_ids (Optional[VpcIdStringList], default: None ) –

    The IDs of the VPCs to describe encryption control configurations for.

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

    The token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request.

  • max_results (Optional[DescribeVpcEncryptionControlsMaxResults], default: None ) –

    The maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output. For more information, see Pagination.

Raises:

Source code in docs_src/capo_ec2/_services/async_ec2.py
async def describe_vpc_encryption_controls(
    self,
    *,
    config_overrides: Optional[AsyncEC2ClientConfig] = None,
    dry_run: Optional["capo_ec2.types.boolean.Boolean"] = None,
    filters: Optional["capo_ec2.types.filter_list.FilterList"] = None,
    vpc_encryption_control_ids: Optional[
        "capo_ec2.types.vpc_encryption_control_id_list.VpcEncryptionControlIdList"
    ] = None,
    vpc_ids: Optional["capo_ec2.types.vpc_id_string_list.VpcIdStringList"] = None,
    next_token: Optional["capo_ec2.types.string.String"] = None,
    max_results: Optional[
        "capo_ec2.types.describe_vpc_encryption_controls_max_results.DescribeVpcEncryptionControlsMaxResults"
    ] = None,
) -> "capo_ec2.types.describe_vpc_encryption_controls_result.DescribeVpcEncryptionControlsResult":
    """<p>Describes one or more VPC Encryption Control configurations. VPC Encryption Control enables you to enforce encryption for all data in transit within and between VPCs to meet compliance requirements You can filter the results to return information about specific encryption controls or VPCs.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-encryption-controls.html">Enforce VPC encryption in transit</a> in the <i>Amazon VPC User Guide</i>.</p>

    Args:
        dry_run: <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
        filters: <p>The filters to apply to the request.</p>
        vpc_encryption_control_ids: <p>The IDs of the VPC Encryption Control configurations to describe.</p>
        vpc_ids: <p>The IDs of the VPCs to describe encryption control configurations for.</p>
        next_token: <p>The token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request.</p>
        max_results: <p>The maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination">Pagination</a>.</p>

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

    async def _handler(
        req: "AsyncOperationRequest[capo_ec2.types.describe_vpc_encryption_controls_request.DescribeVpcEncryptionControlsRequest]",
    ) -> AsyncOperationResponse[
        "capo_ec2.types.describe_vpc_encryption_controls_result.DescribeVpcEncryptionControlsResult"
    ]:
        import capo_ec2._operations.amazon_ec2.describe_vpc_encryption_controls

        (
            output,
            http_response,
        ) = await capo_ec2._operations.amazon_ec2.describe_vpc_encryption_controls.async_describe_vpc_encryption_controls(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeVpcEncryptionControls")
    )
    input_: capo_ec2.types.describe_vpc_encryption_controls_request.DescribeVpcEncryptionControlsRequest = {}
    if dry_run is not None:
        input_["dry_run"] = dry_run
    if filters is not None:
        input_["filters"] = filters
    if vpc_encryption_control_ids is not None:
        input_["vpc_encryption_control_ids"] = vpc_encryption_control_ids
    if vpc_ids is not None:
        input_["vpc_ids"] = vpc_ids
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

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