ALIYUN::ResourceManager::DeliveryChannel

更新时间:
复制为 MD 格式

ALIYUN::ResourceManager::DeliveryChannel类型用于创建当前账号资源投递渠道。

语法

{
  "Type": "ALIYUN::ResourceManager::DeliveryChannel",
  "Properties": {
    "DeliveryChannelName": String,
    "DeliveryChannelFilter": Map,
    "DeliveryChannelId": String,
    "DeliveryChannelDescription": String,
    "EnabledResourceSnapshotDelivery": String,
    "EnabledResourceChangeDelivery": String,
    "ResourceChangeDelivery": Map,
    "ResourceSnapshotDelivery": Map
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

DeliveryChannelFilter

Map

投递渠道的有效范围。

更多信息,请参考DeliveryChannelFilter属性

DeliveryChannelName

String

投递渠道的名称。

DeliveryChannelDescription

String

投递渠道的描述。

DeliveryChannelId

String

投递渠道的ID。

EnabledResourceChangeDelivery

String

启用资源变更投递。

EnabledResourceSnapshotDelivery

String

启用资源快照投递。

ResourceChangeDelivery

Map

资源配置变更的投递。

更多信息,请参考ResourceChangeDelivery属性

ResourceSnapshotDelivery

Map

资源快照的定时投递。

更多信息,请参考ResourceSnapshotDelivery属性

ResourceChangeDelivery语法

"ResourceChangeDelivery": {
  "SlsProperties": Map,
  "TargetArn": String
}

ResourceChangeDelivery属性

属性名称

类型

必须

允许更新

描述

约束

SlsProperties

Map

SLS配置。

更多信息,请参考SlsProperties属性

TargetArn

String

目标的ARN。

有效取值:

* 如果将TargetType设置为OSS,请将TargetArn设置为带有resourcecenter-前缀的OSS BucketARN。

* 如果将TargetType设置为SLS,请将TargetArn设置为带有resourcecenter-前缀的SLS LogstoreARN。

SlsProperties语法

"SlsProperties": {
  "OversizedDataOssTargetArn": String
}

SlsProperties属性

属性名称

类型

必须

允许更新

描述

约束

OversizedDataOssTargetArn

String

超大文件的目标OSS BucketARN。

如果资源配置变更事件的大小超过1 MB,该事件将作为OSS对象投递。请将此参数设置为带有resourcecenter-前缀的OSS BucketARN。

DeliveryChannelFilter语法

"DeliveryChannelFilter": {
  "ResourceTypes": List,
  "AccountScopes": List
}

DeliveryChannelFilter属性

属性名称

类型

必须

允许更新

描述

约束

AccountScopes

List

投递范围内的账号。

ResourceTypes

List

待投递的资源类型列表。

ResourceSnapshotDelivery语法

"ResourceSnapshotDelivery": {
  "CustomExpression": String,
  "DeliveryTime": String,
  "SlsProperties": Map,
  "TargetArn": String
}

ResourceSnapshotDelivery属性

属性名称

类型

必须

允许更新

描述

约束

CustomExpression

String

自定义表达式。

DeliveryTime

String

投递时间。

SlsProperties

Map

SLS配置。

TargetArn

String

目标的ARN。

返回值

Fn::GetAtt

  • ResourceChangeDelivery:资源配置变更的投递。

  • DeliveryChannelName:投递渠道的名称。

  • DeliveryChannelId:投递渠道的ID。

  • DeliveryChannelDescription:投递渠道的描述。

  • DeliveryChannelFilter:投递渠道的有效范围。

  • ResourceSnapshotDelivery:资源快照的定时投递。

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  DeliveryChannelName:
    Type: String
    Description:
      en: The name of the delivery channel.
    Required: true
  DeliveryChannelFilter:
    Description:
      en: The effective scope of the delivery channel.
    Required: true
    Type: Json
    AssociationPropertyMetadata:
      Parameters:
        ResourceTypes:
          Description:
            en: The list of resource types to be delivered.
          Required: false
          Default: Null
          Type: Json
          AssociationProperty: List[Parameter]
          AssociationPropertyMetadata:
            Parameter:
              Type: String
              Description:
                en: The resource type to be delivered.
              Default: Null
              Required: false
        AccountScopes:
          Description:
            en: The accounts within the delivery scope.
          Required: false
          Default: Null
          Type: Json
          AssociationProperty: List[Parameter]
          AssociationPropertyMetadata:
            Parameter:
              Type: String
              Description:
                en: The account within the delivery scope.
              Default: Null
              Required: false
  DeliveryChannelId:
    Type: String
    Description:
      en: The ID of the delivery channel.
    Default: Null
    Required: false
  EnabledResourceSnapshotDelivery:
    Type: String
    Description:
      en: Enable resource snapshot delivery.
    Default: Null
    Required: false
  ResourceSnapshotDelivery:
    Description:
      en: The scheduled delivery of resource snapshots.
    Required: false
    Default: Null
    Type: Json
    AssociationPropertyMetadata:
      Parameters:
        TargetArn:
          Type: String
          Description:
            en: The ARN of the destination.
          Default: Null
          Required: false
        CustomExpression:
          Type: String
          Description:
            en: The custom expression.
          Default: Null
          Required: false
        SlsProperties:
          Description:
            en: The SLS configurations.
          Required: false
          Default: Null
          Type: Json
          AssociationPropertyMetadata:
            Parameters:
              OversizedDataOssTargetArn:
                Type: String
                Description:
                  en: The ARN of the destination OSS bucket for oversized files. If the size of a resource configuration change event exceeds 1 MB, the event is delivered as an OSS object. Set this parameter to the ARN of an OSS bucket that has the resourcecenter- prefix.
                Default: Null
                Required: false
        DeliveryTime:
          Type: String
          Description:
            en: The delivery time.
          Default: Null
          Required: false
  DeliveryChannelDescription:
    Type: String
    Description:
      en: The description of the delivery channel.
    Default: Null
    Required: false
  ResourceChangeDelivery:
    Description:
      en: The delivery of resource configuration changes.
    Required: false
    Default: Null
    Type: Json
    AssociationPropertyMetadata:
      Parameters:
        TargetArn:
          Type: String
          Description:
            en: |-
              The ARN of the destination. Valid values: 
              * If you set TargetType to OSS, set TargetArn to the ARN of an OSS bucket that has the resourcecenter- prefix.
              * If you set TargetType to SLS, set TargetArn to the ARN of an SLS Logstore that has the resourcecenter- prefix.
          Default: Null
          Required: false
        SlsProperties:
          Description:
            en: The SLS configurations.
          Required: false
          Default: Null
          Type: Json
          AssociationPropertyMetadata:
            Parameters:
              OversizedDataOssTargetArn:
                Type: String
                Description:
                  en: The ARN of the destination OSS bucket for oversized files. If the size of a resource configuration change event exceeds 1 MB, the event is delivered as an OSS object. Set this parameter to the ARN of an OSS bucket that has the resourcecenter- prefix.
                Default: Null
                Required: false
  EnabledResourceChangeDelivery:
    Type: String
    Description:
      en: Enable resource change delivery.
    Default: Null
    Required: false
Resources:
  ExtensionResource:
    Type: ALIYUN::ResourceManager::DeliveryChannel
    Properties:
      DeliveryChannelName:
        Ref: DeliveryChannelName
      DeliveryChannelFilter:
        Ref: DeliveryChannelFilter
      DeliveryChannelId:
        Ref: DeliveryChannelId
      EnabledResourceSnapshotDelivery:
        Ref: EnabledResourceSnapshotDelivery
      ResourceSnapshotDelivery:
        Ref: ResourceSnapshotDelivery
      DeliveryChannelDescription:
        Ref: DeliveryChannelDescription
      ResourceChangeDelivery:
        Ref: ResourceChangeDelivery
      EnabledResourceChangeDelivery:
        Ref: EnabledResourceChangeDelivery
Outputs:
  DeliveryChannelName:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - DeliveryChannelName
    Description: The name of the delivery channel.
  DeliveryChannelFilter:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - DeliveryChannelFilter
    Description: The effective scope of the delivery channel.
  DeliveryChannelId:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - DeliveryChannelId
    Description: The ID of the delivery channel.
  ResourceSnapshotDelivery:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - ResourceSnapshotDelivery
    Description: The scheduled delivery of resource snapshots.
  DeliveryChannelDescription:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - DeliveryChannelDescription
    Description: The description of the delivery channel.
  ResourceChangeDelivery:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - ResourceChangeDelivery
    Description: The delivery of resource configuration changes.
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "DeliveryChannelName": {
      "Type": "String",
      "Description": {
        "en": "The name of the delivery channel."
      },
      "Required": true
    },
    "DeliveryChannelFilter": {
      "Description": {
        "en": "The effective scope of the delivery channel."
      },
      "Required": true,
      "Type": "Json",
      "AssociationPropertyMetadata": {
        "Parameters": {
          "ResourceTypes": {
            "Description": {
              "en": "The list of resource types to be delivered."
            },
            "Required": false,
            "Default": null,
            "Type": "Json",
            "AssociationProperty": "List[Parameter]",
            "AssociationPropertyMetadata": {
              "Parameter": {
                "Type": "String",
                "Description": {
                  "en": "The resource type to be delivered."
                },
                "Default": null,
                "Required": false
              }
            }
          },
          "AccountScopes": {
            "Description": {
              "en": "The accounts within the delivery scope."
            },
            "Required": false,
            "Default": null,
            "Type": "Json",
            "AssociationProperty": "List[Parameter]",
            "AssociationPropertyMetadata": {
              "Parameter": {
                "Type": "String",
                "Description": {
                  "en": "The account within the delivery scope."
                },
                "Default": null,
                "Required": false
              }
            }
          }
        }
      }
    },
    "DeliveryChannelId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the delivery channel."
      },
      "Default": null,
      "Required": false
    },
    "EnabledResourceSnapshotDelivery": {
      "Type": "String",
      "Description": {
        "en": "Enable resource snapshot delivery."
      },
      "Default": null,
      "Required": false
    },
    "ResourceSnapshotDelivery": {
      "Description": {
        "en": "The scheduled delivery of resource snapshots."
      },
      "Required": false,
      "Default": null,
      "Type": "Json",
      "AssociationPropertyMetadata": {
        "Parameters": {
          "TargetArn": {
            "Type": "String",
            "Description": {
              "en": "The ARN of the destination."
            },
            "Default": null,
            "Required": false
          },
          "CustomExpression": {
            "Type": "String",
            "Description": {
              "en": "The custom expression."
            },
            "Default": null,
            "Required": false
          },
          "SlsProperties": {
            "Description": {
              "en": "The SLS configurations."
            },
            "Required": false,
            "Default": null,
            "Type": "Json",
            "AssociationPropertyMetadata": {
              "Parameters": {
                "OversizedDataOssTargetArn": {
                  "Type": "String",
                  "Description": {
                    "en": "The ARN of the destination OSS bucket for oversized files. If the size of a resource configuration change event exceeds 1 MB, the event is delivered as an OSS object. Set this parameter to the ARN of an OSS bucket that has the resourcecenter- prefix."
                  },
                  "Default": null,
                  "Required": false
                }
              }
            }
          },
          "DeliveryTime": {
            "Type": "String",
            "Description": {
              "en": "The delivery time."
            },
            "Default": null,
            "Required": false
          }
        }
      }
    },
    "DeliveryChannelDescription": {
      "Type": "String",
      "Description": {
        "en": "The description of the delivery channel."
      },
      "Default": null,
      "Required": false
    },
    "ResourceChangeDelivery": {
      "Description": {
        "en": "The delivery of resource configuration changes."
      },
      "Required": false,
      "Default": null,
      "Type": "Json",
      "AssociationPropertyMetadata": {
        "Parameters": {
          "TargetArn": {
            "Type": "String",
            "Description": {
              "en": "The ARN of the destination. Valid values: \n* If you set TargetType to OSS, set TargetArn to the ARN of an OSS bucket that has the resourcecenter- prefix.\n* If you set TargetType to SLS, set TargetArn to the ARN of an SLS Logstore that has the resourcecenter- prefix."
            },
            "Default": null,
            "Required": false
          },
          "SlsProperties": {
            "Description": {
              "en": "The SLS configurations."
            },
            "Required": false,
            "Default": null,
            "Type": "Json",
            "AssociationPropertyMetadata": {
              "Parameters": {
                "OversizedDataOssTargetArn": {
                  "Type": "String",
                  "Description": {
                    "en": "The ARN of the destination OSS bucket for oversized files. If the size of a resource configuration change event exceeds 1 MB, the event is delivered as an OSS object. Set this parameter to the ARN of an OSS bucket that has the resourcecenter- prefix."
                  },
                  "Default": null,
                  "Required": false
                }
              }
            }
          }
        }
      }
    },
    "EnabledResourceChangeDelivery": {
      "Type": "String",
      "Description": {
        "en": "Enable resource change delivery."
      },
      "Default": null,
      "Required": false
    }
  },
  "Resources": {
    "ExtensionResource": {
      "Type": "ALIYUN::ResourceManager::DeliveryChannel",
      "Properties": {
        "DeliveryChannelName": {
          "Ref": "DeliveryChannelName"
        },
        "DeliveryChannelFilter": {
          "Ref": "DeliveryChannelFilter"
        },
        "DeliveryChannelId": {
          "Ref": "DeliveryChannelId"
        },
        "EnabledResourceSnapshotDelivery": {
          "Ref": "EnabledResourceSnapshotDelivery"
        },
        "ResourceSnapshotDelivery": {
          "Ref": "ResourceSnapshotDelivery"
        },
        "DeliveryChannelDescription": {
          "Ref": "DeliveryChannelDescription"
        },
        "ResourceChangeDelivery": {
          "Ref": "ResourceChangeDelivery"
        },
        "EnabledResourceChangeDelivery": {
          "Ref": "EnabledResourceChangeDelivery"
        }
      }
    }
  },
  "Outputs": {
    "DeliveryChannelName": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "DeliveryChannelName"
        ]
      },
      "Description": "The name of the delivery channel."
    },
    "DeliveryChannelFilter": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "DeliveryChannelFilter"
        ]
      },
      "Description": "The effective scope of the delivery channel."
    },
    "DeliveryChannelId": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "DeliveryChannelId"
        ]
      },
      "Description": "The ID of the delivery channel."
    },
    "ResourceSnapshotDelivery": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "ResourceSnapshotDelivery"
        ]
      },
      "Description": "The scheduled delivery of resource snapshots."
    },
    "DeliveryChannelDescription": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "DeliveryChannelDescription"
        ]
      },
      "Description": "The description of the delivery channel."
    },
    "ResourceChangeDelivery": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "ResourceChangeDelivery"
        ]
      },
      "Description": "The delivery of resource configuration changes."
    }
  }
}