Skip to main content

vpc_endpoint_service_permissions

Creates, updates, deletes, gets or lists a vpc_endpoint_service_permissions resource.

Overview

Namevpc_endpoint_service_permissions
TypeResource
Idaws.ec2.vpc_endpoint_service_permissions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
principalstringThe Amazon Resource Name (ARN) of the principal.
principal_typestringThe type of principal.
service_idstringThe ID of the service.
service_permission_idstringThe ID of the service permission.
tagsstringThe tags.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_vpc_endpoint_service_permissionsselectServiceId, regionDryRun, Filter, MaxResults, NextTokenDescribes the principals (service consumers) that are permitted to discover your VPC endpoint service. Principal ARNs with path components aren't supported.
modify_vpc_endpoint_service_permissionsupdateServiceId, regionDryRun, AddAllowedPrincipals, RemoveAllowedPrincipalsModifies the permissions for your VPC endpoint service. You can add or remove permissions for service consumers (Amazon Web Services accounts, users, and IAM roles) to connect to your endpoint service. Principal ARNs with path components aren't supported. If you grant permissions to all principals, the service is public. Any users who know the name of a public service can send a request to attach an endpoint. If the service does not require manual approval, attachments are automatically approved.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
ServiceIdstringThe ID of the service.
regionstringAWS region (default: us-east-1)
AddAllowedPrincipalsarrayThe Amazon Resource Names (ARN) of the principals. Permissions are granted to the principals in this list. To grant permissions to all principals, specify an asterisk (*).
DryRunbooleanChecks 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.
FilterarrayThe filters. principal - The ARN of the principal. principal-type - The principal type (All | Service | OrganizationUnit | Account | User | Role).
MaxResultsintegerThe 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.
NextTokenstringThe token to retrieve the next page of results.
RemoveAllowedPrincipalsarrayThe Amazon Resource Names (ARN) of the principals. Permissions are revoked for principals in this list.

SELECT examples

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

SELECT
principal,
principal_type,
service_id,
service_permission_id,
tags
FROM aws.ec2.vpc_endpoint_service_permissions
WHERE ServiceId = '{{ ServiceId }}' -- required
AND region = '{{ region }}' -- required
AND DryRun = '{{ DryRun }}'
AND Filter = '{{ Filter }}'
AND MaxResults = '{{ MaxResults }}'
AND NextToken = '{{ NextToken }}'
;

UPDATE examples

Modifies the permissions for your VPC endpoint service. You can add or remove permissions for service consumers (Amazon Web Services accounts, users, and IAM roles) to connect to your endpoint service. Principal ARNs with path components aren't supported. If you grant permissions to all principals, the service is public. Any users who know the name of a public service can send a request to attach an endpoint. If the service does not require manual approval, attachments are automatically approved.

UPDATE aws.ec2.vpc_endpoint_service_permissions
SET
-- No updatable properties
WHERE
ServiceId = '{{ ServiceId }}' --required
AND region = '{{ region }}' --required
AND DryRun = {{ DryRun}}
AND AddAllowedPrincipals = '{{ AddAllowedPrincipals}}'
AND RemoveAllowedPrincipals = '{{ RemoveAllowedPrincipals}}'
RETURNING
added_principals,
return_value;