All Products
Search
Document Center

Resource Orchestration Service:DATASOURCE::ECS::SecurityGroup

Last Updated:Feb 05, 2025

DATASOURCE::ECS::SecurityGroup is used to query the information about a security group.

Syntax

{
  "Type": "DATASOURCE::ECS::SecurityGroup",
  "Properties": {
    "SecurityGroupId": String, 
    "RefreshOptions": String
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

SecurityGroupId

String

Yes

Yes

The ID of the security group.

None.

RefreshOptions

String

No

Yes

The refresh policy for data source resources when the stack is updated.

Valid values:

  • Never (default): does not refresh data source resources when the stack is updated.

  • Always: refreshes data source resources when the stack is updated.

Return values

Fn::GetAtt

  • Description: the description of the security group.

  • SecurityGroupName: the name of the security group.

  • ServiceManaged: indicates whether the security group is owned by a cloud service or distributor.

  • ResourceGroupId: the ID of the resource group.

  • SecurityGroupReferences: all the authorization information about the security group.

  • SecurityGroupId: the ID of the security group.

  • CreateTime: the creation time of the security group.

  • SecurityGroupType: the type of the security group.

  • ServiceId: the ID of the distributor to which the security group belongs.

  • VpcId: the ID of the virtual private cloud (VPC) to which the security group belongs.

  • Permissions: the permissions of the security group.

  • InnerAccessPolicy: the network communication policy for the security group.

  • Tags: the tags that are added to the security group.

Examples

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  SecurityGroupId:
    AssociationPropertyMetadata:
      VpcId: ${VpcId}
    AssociationProperty: ALIYUN::ECS::SecurityGroup::SecurityGroupId
    Type: String
    Description:
      en: Security group ID.
    Required: true
Resources:
  ExtensionDataSource:
    Type: DATASOURCE::ECS::SecurityGroup
    Properties:
      SecurityGroupId:
        Ref: SecurityGroupId
Outputs:
  Description:
    Description: The description.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Description
  SecurityGroupName:
    Description: The security group name.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - SecurityGroupName
  ServiceManaged:
    Description: Whether the owner of the security group is a cloud product or vendor.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - ServiceManaged
  ResourceGroupId:
    Description: The enterprise resource group ID where the security group resides.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - ResourceGroupId
  SecurityGroupReferences:
    Description: The complete information about the authorization of all user-specified security groups.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - SecurityGroupReferences
  SecurityGroupId:
    Description: Security group ID.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - SecurityGroupId
  CreateTime:
    Description: The create time.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - CreateTime
  SecurityGroupType:
    Description: Security group type.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - SecurityGroupType
  ServiceId:
    Description: The virtual quotient ID corresponding to the security group.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - ServiceId
  VpcId:
    Description: Secure the group's proprietary network.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - VpcId
  Permissions:
    Description: A collection of Security Group permission rules.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Permissions
  InnerAccessPolicy:
    Description: Network connectivity policy within the security group.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - InnerAccessPolicy
  Tags:
    Description: The tags.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Tags
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "SecurityGroupId": {
      "AssociationPropertyMetadata": {
        "VpcId": "${VpcId}"
      },
      "AssociationProperty": "ALIYUN::ECS::SecurityGroup::SecurityGroupId",
      "Type": "String",
      "Description": {
        "en": "Security group ID."
      },
      "Required": true
    }
  },
  "Resources": {
    "ExtensionDataSource": {
      "Type": "DATASOURCE::ECS::SecurityGroup",
      "Properties": {
        "SecurityGroupId": {
          "Ref": "SecurityGroupId"
        }
      }
    }
  },
  "Outputs": {
    "Description": {
      "Description": "The description.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Description"
        ]
      }
    },
    "SecurityGroupName": {
      "Description": "The security group name.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "SecurityGroupName"
        ]
      }
    },
    "ServiceManaged": {
      "Description": "Whether the owner of the security group is a cloud product or vendor.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "ServiceManaged"
        ]
      }
    },
    "ResourceGroupId": {
      "Description": "The enterprise resource group ID where the security group resides.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "ResourceGroupId"
        ]
      }
    },
    "SecurityGroupReferences": {
      "Description": "The complete information about the authorization of all user-specified security groups.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "SecurityGroupReferences"
        ]
      }
    },
    "SecurityGroupId": {
      "Description": "Security group ID.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "SecurityGroupId"
        ]
      }
    },
    "CreateTime": {
      "Description": "The create time.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "CreateTime"
        ]
      }
    },
    "SecurityGroupType": {
      "Description": "Security group type.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "SecurityGroupType"
        ]
      }
    },
    "ServiceId": {
      "Description": "The virtual quotient ID corresponding to the security group.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "ServiceId"
        ]
      }
    },
    "VpcId": {
      "Description": "Secure the group's proprietary network.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "VpcId"
        ]
      }
    },
    "Permissions": {
      "Description": "A collection of Security Group permission rules.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Permissions"
        ]
      }
    },
    "InnerAccessPolicy": {
      "Description": "Network connectivity policy within the security group.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "InnerAccessPolicy"
        ]
      }
    },
    "Tags": {
      "Description": "The tags.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Tags"
        ]
      }
    }
  }
}