ALIYUN::CMS2::PrometheusInstance

更新时间:
复制 MD 格式

ALIYUN::CMS2::PrometheusInstance类型用于创建Prometheus监控实例。

语法

{
  "Type": "ALIYUN::CMS2::PrometheusInstance",
  "Properties": {
    "PrometheusInstanceName": String,
    "ArchiveDuration": Integer,
    "AuthFreeReadPolicy": String,
    "AuthFreeWritePolicy": String,
    "BasicMetricQueryLimit": Boolean,
    "EnableAuthToken": Boolean,
    "EnableAuthFreeRead": Boolean,
    "EnableAuthFreeWrite": Boolean,
    "PaymentType": String,
    "ResourceGroupId": String,
    "Status": String,
    "StorageDuration": Integer,
    "Workspace": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

PrometheusInstanceName

String

Prometheus实例名称。

最小长度:1 。

最大长度:128。

ArchiveDuration

Integer

Prometheus实例的归档时长。

最小值:0 。

最大值:3650。

AuthFreeReadPolicy

String

Prometheus实例的免认证读策略。

AuthFreeWritePolicy

String

Prometheus实例的免认证写策略。

BasicMetricQueryLimit

Boolean

Prometheus实例的基础指标查询限制。

EnableAuthFreeRead

Boolean

是否为Prometheus实例启用免认证读。

EnableAuthFreeWrite

Boolean

是否为Prometheus实例启用免认证写。

EnableAuthToken

Boolean

是否为Prometheus实例启用认证Token。

PaymentType

String

Prometheus实例的付费类型。

取值:

  • POSTPAY

  • POSTPAY_GB

ResourceGroupId

String

资源组ID。

Status

String

Prometheus实例的状态。

StorageDuration

Integer

Prometheus实例的存储时长。

取值:

  • 15

  • 30

  • 60

  • 90

  • 180

Workspace

String

Prometheus实例的工作空间。

返回值

Fn::GetAtt

  • PushGatewayIntraUrl:Prometheus实例的PushGateway内网地址。

  • RemoteReadIntraUrl:Prometheus实例的RemoteRead内网地址。

  • RemoteReadInterUrl:Prometheus实例的RemoteRead外网地址。

  • PrometheusInstanceId:Prometheus实例ID。

  • PushGatewayInterUrl:Prometheus实例的PushGateway外网地址。

  • HttpApiIntraUrl:Prometheus实例的HTTP API内网地址。

  • RemoteWriteIntraUrl:Prometheus实例的RemoteWrite内网地址。

  • RemoteWriteInterUrl:Prometheus实例的RemoteWrite外网地址。

  • HttpApiInterUrl:Prometheus实例的HTTP API外网地址。

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  ArchiveDuration:
    Type: Number
    Description:
      en: The archive duration of the Prometheus instance.
    MinValue: 0
    MaxValue: 3650
    Default: Null
    Required: false
  PrometheusInstanceName:
    Type: String
    Description:
      en: The name of the Prometheus instance.
    MinLength: 1
    MaxLength: 128
    Required: true
  AuthFreeReadPolicy:
    Type: String
    Description:
      en: The authentication-free read policy of the Prometheus instance.
    Default: Null
    Required: false
  AuthFreeWritePolicy:
    Type: String
    Description:
      en: The authentication-free write policy of the Prometheus instance.
    Default: Null
    Required: false
  EnableAuthFreeRead:
    Type: Boolean
    Description:
      en: Whether to enable authentication-free read for the Prometheus instance.
    Default: Null
    Required: false
  EnableAuthFreeWrite:
    Type: Boolean
    Description:
      en: Whether to enable authentication-free write for the Prometheus instance.
    Default: Null
    Required: false
  EnableAuthToken:
    Type: Boolean
    Description:
      en: Whether to enable authentication token for the Prometheus instance.
    Default: Null
    Required: false
  ResourceGroupId:
    Type: String
    Description:
      en: The ID of the resource group.
    AssociationProperty: ALIYUN::ECS::ResourceGroup::ResourceGroupId
    Default: Null
    Required: false
  Status:
    Type: String
    Description:
      en: The status of the Prometheus instance.
    Default: Null
    Required: false
  BasicMetricQueryLimit:
    Type: Boolean
    Description:
      en: The basic metric query limit of the Prometheus instance.
    Default: Null
    Required: false
  StorageDuration:
    Type: Number
    Description:
      en: The storage duration of the Prometheus instance.
    AllowedValues:
      - 15
      - 30
      - 60
      - 90
      - 180
    Default: Null
    Required: false
  Workspace:
    Type: String
    Description:
      en: The workspace of the Prometheus instance.
    Default: Null
    Required: false
  PaymentType:
    Type: String
    Description:
      en: The payment type of the Prometheus instance.
    AllowedValues:
      - POSTPAY
      - POSTPAY_GB
    Default: Null
    Required: false
Resources:
  PrometheusInstance:
    Type: ALIYUN::CMS2::PrometheusInstance
    Properties:
      ArchiveDuration:
        Ref: ArchiveDuration
      PrometheusInstanceName:
        Ref: PrometheusInstanceName
      AuthFreeReadPolicy:
        Ref: AuthFreeReadPolicy
      AuthFreeWritePolicy:
        Ref: AuthFreeWritePolicy
      EnableAuthFreeRead:
        Ref: EnableAuthFreeRead
      EnableAuthFreeWrite:
        Ref: EnableAuthFreeWrite
      EnableAuthToken:
        Ref: EnableAuthToken
      ResourceGroupId:
        Ref: ResourceGroupId
      Status:
        Ref: Status
      BasicMetricQueryLimit:
        Ref: BasicMetricQueryLimit
      StorageDuration:
        Ref: StorageDuration
      Workspace:
        Ref: Workspace
      PaymentType:
        Ref: PaymentType
Outputs:
  PrometheusInstanceId:
    Value:
      Fn::GetAtt:
        - PrometheusInstance
        - PrometheusInstanceId
    Description: The ID of the Prometheus instance.
  HttpApiIntraUrl:
    Value:
      Fn::GetAtt:
        - PrometheusInstance
        - HttpApiIntraUrl
    Description: The HTTP API intra URL of the Prometheus instance.
  HttpApiInterUrl:
    Value:
      Fn::GetAtt:
        - PrometheusInstance
        - HttpApiInterUrl
    Description: The HTTP API inter URL of the Prometheus instance.
  RemoteWriteIntraUrl:
    Value:
      Fn::GetAtt:
        - PrometheusInstance
        - RemoteWriteIntraUrl
    Description: The remote write intra URL of the Prometheus instance.
  RemoteReadIntraUrl:
    Value:
      Fn::GetAtt:
        - PrometheusInstance
        - RemoteReadIntraUrl
    Description: The remote read intra URL of the Prometheus instance.
  PushGatewayInterUrl:
    Value:
      Fn::GetAtt:
        - PrometheusInstance
        - PushGatewayInterUrl
    Description: The push gateway inter URL of the Prometheus instance.
  RemoteWriteInterUrl:
    Value:
      Fn::GetAtt:
        - PrometheusInstance
        - RemoteWriteInterUrl
    Description: The remote write inter URL of the Prometheus instance.
  RemoteReadInterUrl:
    Value:
      Fn::GetAtt:
        - PrometheusInstance
        - RemoteReadInterUrl
    Description: The remote read inter URL of the Prometheus instance.
  PushGatewayIntraUrl:
    Value:
      Fn::GetAtt:
        - PrometheusInstance
        - PushGatewayIntraUrl
    Description: The push gateway intra URL of the Prometheus instance.
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "ArchiveDuration": {
      "Type": "Number",
      "Description": {
        "en": "The archive duration of the Prometheus instance."
      },
      "MinValue": 0,
      "MaxValue": 3650,
      "Default": null,
      "Required": false
    },
    "PrometheusInstanceName": {
      "Type": "String",
      "Description": {
        "en": "The name of the Prometheus instance."
      },
      "MinLength": 1,
      "MaxLength": 128,
      "Required": true
    },
    "AuthFreeReadPolicy": {
      "Type": "String",
      "Description": {
        "en": "The authentication-free read policy of the Prometheus instance."
      },
      "Default": null,
      "Required": false
    },
    "AuthFreeWritePolicy": {
      "Type": "String",
      "Description": {
        "en": "The authentication-free write policy of the Prometheus instance."
      },
      "Default": null,
      "Required": false
    },
    "EnableAuthFreeRead": {
      "Type": "Boolean",
      "Description": {
        "en": "Whether to enable authentication-free read for the Prometheus instance."
      },
      "Default": null,
      "Required": false
    },
    "EnableAuthFreeWrite": {
      "Type": "Boolean",
      "Description": {
        "en": "Whether to enable authentication-free write for the Prometheus instance."
      },
      "Default": null,
      "Required": false
    },
    "EnableAuthToken": {
      "Type": "Boolean",
      "Description": {
        "en": "Whether to enable authentication token for the Prometheus instance."
      },
      "Default": null,
      "Required": false
    },
    "ResourceGroupId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the resource group."
      },
      "AssociationProperty": "ALIYUN::ECS::ResourceGroup::ResourceGroupId",
      "Default": null,
      "Required": false
    },
    "Status": {
      "Type": "String",
      "Description": {
        "en": "The status of the Prometheus instance."
      },
      "Default": null,
      "Required": false
    },
    "BasicMetricQueryLimit": {
      "Type": "Boolean",
      "Description": {
        "en": "The basic metric query limit of the Prometheus instance."
      },
      "Default": null,
      "Required": false
    },
    "StorageDuration": {
      "Type": "Number",
      "Description": {
        "en": "The storage duration of the Prometheus instance."
      },
      "AllowedValues": [
        15,
        30,
        60,
        90,
        180
      ],
      "Default": null,
      "Required": false
    },
    "Workspace": {
      "Type": "String",
      "Description": {
        "en": "The workspace of the Prometheus instance."
      },
      "Default": null,
      "Required": false
    },
    "PaymentType": {
      "Type": "String",
      "Description": {
        "en": "The payment type of the Prometheus instance."
      },
      "AllowedValues": [
        "POSTPAY",
        "POSTPAY_GB"
      ],
      "Default": null,
      "Required": false
    }
  },
  "Resources": {
    "PrometheusInstance": {
      "Type": "ALIYUN::CMS2::PrometheusInstance",
      "Properties": {
        "ArchiveDuration": {
          "Ref": "ArchiveDuration"
        },
        "PrometheusInstanceName": {
          "Ref": "PrometheusInstanceName"
        },
        "AuthFreeReadPolicy": {
          "Ref": "AuthFreeReadPolicy"
        },
        "AuthFreeWritePolicy": {
          "Ref": "AuthFreeWritePolicy"
        },
        "EnableAuthFreeRead": {
          "Ref": "EnableAuthFreeRead"
        },
        "EnableAuthFreeWrite": {
          "Ref": "EnableAuthFreeWrite"
        },
        "EnableAuthToken": {
          "Ref": "EnableAuthToken"
        },
        "ResourceGroupId": {
          "Ref": "ResourceGroupId"
        },
        "Status": {
          "Ref": "Status"
        },
        "BasicMetricQueryLimit": {
          "Ref": "BasicMetricQueryLimit"
        },
        "StorageDuration": {
          "Ref": "StorageDuration"
        },
        "Workspace": {
          "Ref": "Workspace"
        },
        "PaymentType": {
          "Ref": "PaymentType"
        }
      }
    }
  },
  "Outputs": {
    "PrometheusInstanceId": {
      "Value": {
        "Fn::GetAtt": [
          "PrometheusInstance",
          "PrometheusInstanceId"
        ]
      },
      "Description": "The ID of the Prometheus instance."
    },
    "HttpApiIntraUrl": {
      "Value": {
        "Fn::GetAtt": [
          "PrometheusInstance",
          "HttpApiIntraUrl"
        ]
      },
      "Description": "The HTTP API intra URL of the Prometheus instance."
    },
    "HttpApiInterUrl": {
      "Value": {
        "Fn::GetAtt": [
          "PrometheusInstance",
          "HttpApiInterUrl"
        ]
      },
      "Description": "The HTTP API inter URL of the Prometheus instance."
    },
    "RemoteWriteIntraUrl": {
      "Value": {
        "Fn::GetAtt": [
          "PrometheusInstance",
          "RemoteWriteIntraUrl"
        ]
      },
      "Description": "The remote write intra URL of the Prometheus instance."
    },
    "RemoteReadIntraUrl": {
      "Value": {
        "Fn::GetAtt": [
          "PrometheusInstance",
          "RemoteReadIntraUrl"
        ]
      },
      "Description": "The remote read intra URL of the Prometheus instance."
    },
    "PushGatewayInterUrl": {
      "Value": {
        "Fn::GetAtt": [
          "PrometheusInstance",
          "PushGatewayInterUrl"
        ]
      },
      "Description": "The push gateway inter URL of the Prometheus instance."
    },
    "RemoteWriteInterUrl": {
      "Value": {
        "Fn::GetAtt": [
          "PrometheusInstance",
          "RemoteWriteInterUrl"
        ]
      },
      "Description": "The remote write inter URL of the Prometheus instance."
    },
    "RemoteReadInterUrl": {
      "Value": {
        "Fn::GetAtt": [
          "PrometheusInstance",
          "RemoteReadInterUrl"
        ]
      },
      "Description": "The remote read inter URL of the Prometheus instance."
    },
    "PushGatewayIntraUrl": {
      "Value": {
        "Fn::GetAtt": [
          "PrometheusInstance",
          "PushGatewayIntraUrl"
        ]
      },
      "Description": "The push gateway intra URL of the Prometheus instance."
    }
  }
}