vpc_endpoint_service_permissions
Creates, updates, deletes, gets or lists a vpc_endpoint_service_permissions resource.
Overview
| Name | vpc_endpoint_service_permissions |
| Type | Resource |
| Id | aws.ec2.vpc_endpoint_service_permissions |
Fields
The following fields are returned by SELECT queries:
- describe_vpc_endpoint_service_permissions
| Name | Datatype | Description |
|---|---|---|
principal | string | The Amazon Resource Name (ARN) of the principal. |
principal_type | string | The type of principal. |
service_id | string | The ID of the service. |
service_permission_id | string | The ID of the service permission. |
tags | string | The tags. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_vpc_endpoint_service_permissions | select | ServiceId, region | DryRun, Filter, MaxResults, NextToken | Describes 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_permissions | update | ServiceId, region | DryRun, AddAllowedPrincipals, RemoveAllowedPrincipals | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
ServiceId | string | The ID of the service. |
region | string | AWS region (default: us-east-1) |
AddAllowedPrincipals | array | The 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 (*). |
DryRun | boolean | 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. |
Filter | array | The filters. principal - The ARN of the principal. principal-type - The principal type (All | Service | OrganizationUnit | Account | User | Role). |
MaxResults | integer | 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. |
NextToken | string | The token to retrieve the next page of results. |
RemoveAllowedPrincipals | array | The Amazon Resource Names (ARN) of the principals. Permissions are revoked for principals in this list. |
SELECT examples
- describe_vpc_endpoint_service_permissions
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
- modify_vpc_endpoint_service_permissions
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;