All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::ECS::NetworkInterfacePermission

Last Updated:Apr 18, 2023

ALIYUN::ECS::NetworkInterfacePermission is used to grant an account the permission to attach an elastic network interface (ENI) to an instance.

Syntax

{
  "Type": "ALIYUN::ECS::NetworkInterfacePermission",
  "Properties": {
    "NetworkInterfaceId": String,
    "AccountId": String,
    "Permission": String
  }
}

Properties

Name

Type

Required

Editable

Description

Validity

NetworkInterfaceId

String

Yes

No

The ID of the ENI.

None

AccountId

String

Yes

No

The ID of the account.

None

Permission

String

Yes

No

The permission granted to the account.

None

Response parameters

Fn::GetAtt

  • NetworkInterfacePermissionId: the ID of the ENI permission.

Examples

YAML format

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  NetworkInterfaceId:
    Type: String
    Description: Network interface id
  Permission:
    Type: String
    Description: the permission
    Default: InstanceAttach
Resources:
  NetworkInterfacePermission:
    Type: ALIYUN::ECS::NetworkInterfacePermission
    Properties:
      NetworkInterfaceId:
        Ref: NetworkInterfaceId
      AccountId:
        Ref: ALIYUN::AccountId
      Permission:
        Ref: Permission

JSON format

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "NetworkInterfaceId": {
      "Type": "String",
      "Description": "Network interface id"
    },
    "Permission": {
      "Type": "String",
      "Description": "the permission",
      "Default": "InstanceAttach"
    }
  },
  "Resources": {
    "NetworkInterfacePermission": {
      "Type": "ALIYUN::ECS::NetworkInterfacePermission",
      "Properties": {
        "NetworkInterfaceId": {
          "Ref": "NetworkInterfaceId"
        },
        "AccountId": {
          "Ref": "ALIYUN::AccountId"
        },
        "Permission": {
          "Ref": "Permission"
        }
      }
    }
  }
}