全部产品
Search
文档中心

资源编排:DATASOURCE::KMS::NetworkRule

更新时间:Oct 14, 2024

DATASOURCE::KMS::NetworkRule类型用于查询一个网络控制规则的详情。

语法

{
  "Type": "DATASOURCE::KMS::NetworkRule",
  "Properties": {
    "NetworkRuleName": String,
    "RefreshOptions": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

NetworkRuleName

String

网络控制规则名称。

RefreshOptions

String

当资源栈更新时,数据源资源的刷新策略。

有效值:

  • Never(默认值):更新堆栈时,从不刷新数据源资源。

  • Always:更新堆栈时,始终刷新数据源资源。

返回值

Fn::GetAtt

  • Description:描述信息。

  • SourcePrivateIp:私网IP地址或者私网网段。

示例

  • YAML格式

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      NetworkRuleName:
        Type: String
        Description:
          en: The name of the access control rule.
        Required: true
    Resources:
      ExtensionDataSource:
        Type: DATASOURCE::KMS::NetworkRule
        Properties:
          NetworkRuleName:
            Ref: NetworkRuleName
    Outputs:
      Description:
        Description: The access control rule description.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - Description
      SourcePrivateIp:
        Description: The private IP address or private CIDR block.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - SourcePrivateIp
    
  • JSON格式

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "NetworkRuleName": {
          "Type": "String",
          "Description": {
            "en": "The name of the access control rule."
          },
          "Required": true
        }
      },
      "Resources": {
        "ExtensionDataSource": {
          "Type": "DATASOURCE::KMS::NetworkRule",
          "Properties": {
            "NetworkRuleName": {
              "Ref": "NetworkRuleName"
            }
          }
        }
      },
      "Outputs": {
        "Description": {
          "Description": "The access control rule description.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "Description"
            ]
          }
        },
        "SourcePrivateIp": {
          "Description": "The private IP address or private CIDR block.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "SourcePrivateIp"
            ]
          }
        }
      }
    }