Skip to content

describe_vpc_endpoint_service_permissions async

describe_vpc_endpoint_service_permissions(
    *,
    config_overrides: Optional[AsyncEC2ClientConfig] = None,
    dry_run: Optional[Boolean] = None,
    service_id: Optional[VpcEndpointServiceId] = None,
    filters: Optional[FilterList] = None,
    max_results: Optional[Integer] = None,
    next_token: Optional[String] = None,
) -> DescribeVpcEndpointServicePermissionsResult

Describes the principals (service consumers) that are permitted to discover your VPC endpoint service. Principal ARNs with path components aren't supported.

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.

  • service_id (Optional[VpcEndpointServiceId], default: None ) –

    The ID of the service.

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

    The filters.

    • principal - The ARN of the principal.

    • principal-type - The principal type (All | Service | OrganizationUnit | Account | User | Role).

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

    The maximum number of results to return for the request in a single page. The remaining results of the initial request can be seen by sending another request with the returned NextToken value. This value can be between 5 and 1,000; if MaxResults is given a value larger than 1,000, only 1,000 results are returned.

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

    The token to retrieve the next page of results.

Raises:

Source code in docs_src/capo_ec2/_services/async_ec2.py
async def describe_vpc_endpoint_service_permissions(
    self,
    *,
    config_overrides: Optional[AsyncEC2ClientConfig] = None,
    dry_run: Optional["capo_ec2.types.boolean.Boolean"] = None,
    service_id: Optional[
        "capo_ec2.types.vpc_endpoint_service_id.VpcEndpointServiceId"
    ] = None,
    filters: Optional["capo_ec2.types.filter_list.FilterList"] = None,
    max_results: Optional["capo_ec2.types.integer.Integer"] = None,
    next_token: Optional["capo_ec2.types.string.String"] = None,
) -> "capo_ec2.types.describe_vpc_endpoint_service_permissions_result.DescribeVpcEndpointServicePermissionsResult":
    """<p>Describes the principals (service consumers) that are permitted to discover your VPC endpoint service. Principal ARNs with path components aren't supported.</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>
        service_id: <p>The ID of the service.</p>
        filters: <p>The filters.</p> <ul> <li> <p> <code>principal</code> - The ARN of the principal.</p> </li> <li> <p> <code>principal-type</code> - The principal type (<code>All</code> | <code>Service</code> | <code>OrganizationUnit</code> | <code>Account</code> | <code>User</code> | <code>Role</code>).</p> </li> </ul>
        max_results: <p>The maximum number of results to return for the request in a single page. The remaining results of the initial request can be seen by sending another request with the returned <code>NextToken</code> value. This value can be between 5 and 1,000; if <code>MaxResults</code> is given a value larger than 1,000, only 1,000 results are returned.</p>
        next_token: <p>The token to retrieve the next page of results.</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_endpoint_service_permissions_request.DescribeVpcEndpointServicePermissionsRequest]",
    ) -> AsyncOperationResponse[
        "capo_ec2.types.describe_vpc_endpoint_service_permissions_result.DescribeVpcEndpointServicePermissionsResult"
    ]:
        import capo_ec2._operations.amazon_ec2.describe_vpc_endpoint_service_permissions

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeVpcEndpointServicePermissions")
    )
    input_: capo_ec2.types.describe_vpc_endpoint_service_permissions_request.DescribeVpcEndpointServicePermissionsRequest = {}
    if dry_run is not None:
        input_["dry_run"] = dry_run
    if service_id is not None:
        input_["service_id"] = service_id
    if filters is not None:
        input_["filters"] = filters
    if max_results is not None:
        input_["max_results"] = max_results
    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