Skip to content
v2.278.0

CfnVPCEndpointServicePermissionsProps ​

Struct External

Properties for defining a CfnVPCEndpointServicePermissions.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ec2 as ec2 } from 'aws-cdk-lib';
const cfnVPCEndpointServicePermissionsProps: ec2.CfnVPCEndpointServicePermissionsProps = {
  serviceId: 'serviceId',

  // the properties below are optional
  allowedPrincipals: ['allowedPrincipals'],
  transitGatewayAttachmentAllowedPrincipals: ['transitGatewayAttachmentAllowedPrincipals'],
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_ec2 as ec2

cfn_vpc_endpoint_service_permissions_props = ec2.CfnVPCEndpointServicePermissionsProps(
    service_id="serviceId",

    # the properties below are optional
    allowed_principals=["allowedPrincipals"],
    transit_gateway_attachment_allowed_principals=["transitGatewayAttachmentAllowedPrincipals"]
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.ec2.*;

CfnVPCEndpointServicePermissionsProps cfnVPCEndpointServicePermissionsProps = CfnVPCEndpointServicePermissionsProps.builder()
        .serviceId("serviceId")

        // the properties below are optional
        .allowedPrincipals(List.of("allowedPrincipals"))
        .transitGatewayAttachmentAllowedPrincipals(List.of("transitGatewayAttachmentAllowedPrincipals"))
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.EC2;

var cfnVPCEndpointServicePermissionsProps = new CfnVPCEndpointServicePermissionsProps {
    ServiceId = "serviceId",

    // the properties below are optional
    AllowedPrincipals = new [] { "allowedPrincipals" },
    TransitGatewayAttachmentAllowedPrincipals = new [] { "transitGatewayAttachmentAllowedPrincipals" }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnVPCEndpointServicePermissionsProps := &CfnVPCEndpointServicePermissionsProps{
	ServiceId: jsii.String("serviceId"),

	// the properties below are optional
	AllowedPrincipals: []*string{
		jsii.String("allowedPrincipals"),
	},
	TransitGatewayAttachmentAllowedPrincipals: []*string{
		jsii.String("transitGatewayAttachmentAllowedPrincipals"),
	},
}

Properties ​

allowedPrincipalsoptionalstring[]allowed_principalsoptionaltyping.List[str]allowedPrincipalsoptionalList<String>AllowedPrincipalsoptionalstring[]AllowedPrincipalsoptional*[]*string #
The Amazon Resource Names (ARN) of one or more principals (for example, users, IAM roles, and AWS accounts ).

Permissions are granted to the principals in this list. To grant permissions to all principals, specify an asterisk (*). Permissions are revoked for principals not in this list. If the list is empty, then all permissions are revoked.

serviceIdstring | IVPCEndpointServiceRefservice_idtyping.Union[str, IVPCEndpointServiceRef]serviceIdStringServiceIdstringServiceIdinterface{} required #
The ID of the service.
transitGatewayAttachmentAllowedPrincipalsoptionalstring[]transit_gateway_attachment_allowed_principalsoptionaltyping.List[str]transitGatewayAttachmentAllowedPrincipalsoptionalList<String>TransitGatewayAttachmentAllowedPrincipalsoptionalstring[]TransitGatewayAttachmentAllowedPrincipalsoptional*[]*string #
The AWS account root ARNs (arn:aws:iam::account-id:root) allowed to create transit gateway attachments that connect to this Gateway Load Balancer endpoint service.