AWS::EC2::NetworkInterfacePermission
Specifies a permission for an Amazon EC2 network interface. For example, you can grant an Amazon authorized partner account permission to attach the specified network interface to an instance in their account.
Syntax
To declare this entity in your Amazon CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::EC2::NetworkInterfacePermission", "Properties" : { "AwsAccountId" :String, "NetworkInterfaceId" :String, "Permission" :String} }
YAML
Type: AWS::EC2::NetworkInterfacePermission Properties: AwsAccountId:StringNetworkInterfaceId:StringPermission:String
Properties
AwsAccountId-
The Amazon Web Services account ID.
Required: Yes
Type: String
Update requires: Replacement
NetworkInterfaceId-
The ID of the network interface.
Required: Yes
Type: String
Update requires: Replacement
Permission-
The type of permission to grant:
INSTANCE-ATTACHorEIP-ASSOCIATE.Required: Yes
Type: String
Allowed values:
EIP-ASSOCIATE | INSTANCE-ATTACHUpdate requires: Replacement
Return values
Ref
When you pass the logical ID of this resource to the intrinsic Reffunction, Refreturns the resource name. For example:
eni-perm-055663b682ea24b48.
For more information about using the Reffunction, see Ref.
Examples
Grant INSTANCE-ATTACH permission
The following example creates a permission (INSTANCE-ATTACH) for a
specified network interface and Amazon account.
JSON
"MyNetworkInterfacePermission": { "Type": "AWS::EC2::NetworkInterfacePermission", "Properties": { "NetworkInterfaceId": "eni-030e3xxx", "AwsAccountId": "11111111111", "Permission": "INSTANCE-ATTACH" } }
YAML
MyNetworkInterfacePermission: Type: AWS::EC2::NetworkInterfacePermission Properties: NetworkInterfaceId: eni-030e3xxx AwsAccountId: '11111111111' Permission: INSTANCE-ATTACH