EC2 / Client / create_network_interface_permission
create_network_interface_permission#
- EC2.Client.create_network_interface_permission(**kwargs)#
- Grants an Amazon Web Services-authorized account permission to attach the specified network interface to an instance in their account. - You can grant permission to a single Amazon Web Services account only, and only one account at a time. - See also: AWS API Documentation - Request Syntax- response = client.create_network_interface_permission( NetworkInterfaceId='string', AwsAccountId='string', AwsService='string', Permission='INSTANCE-ATTACH'|'EIP-ASSOCIATE', DryRun=True|False ) - Parameters:
- NetworkInterfaceId (string) – - [REQUIRED] - The ID of the network interface. 
- AwsAccountId (string) – The Amazon Web Services account ID. 
- AwsService (string) – The Amazon Web Service. Currently not supported. 
- Permission (string) – - [REQUIRED] - The type of permission to grant. 
- 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.
 
- Return type:
- dict 
- Returns:
- Response Syntax- { 'InterfacePermission': { 'NetworkInterfacePermissionId': 'string', 'NetworkInterfaceId': 'string', 'AwsAccountId': 'string', 'AwsService': 'string', 'Permission': 'INSTANCE-ATTACH'|'EIP-ASSOCIATE', 'PermissionState': { 'State': 'pending'|'granted'|'revoking'|'revoked', 'StatusMessage': 'string' } } } - Response Structure- (dict) – - Contains the output of CreateNetworkInterfacePermission. - InterfacePermission (dict) – - Information about the permission for the network interface. - NetworkInterfacePermissionId (string) – - The ID of the network interface permission. 
- NetworkInterfaceId (string) – - The ID of the network interface. 
- AwsAccountId (string) – - The Amazon Web Services account ID. 
- AwsService (string) – - The Amazon Web Service. 
- Permission (string) – - The type of permission. 
- PermissionState (dict) – - Information about the state of the permission. - State (string) – - The state of the permission. 
- StatusMessage (string) – - A status message, if applicable.