All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::CMS2::PrometheusInstance

更新時間:Jul 06, 2026

The ALIYUN::CMS2::PrometheusInstance resource creates a Prometheus instance.

Syntax

{
  "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
  }
}

Properties

Parameter

Type

Required

Editable

Description

Constraints

PrometheusInstanceName

String

Yes

No

The name of the Prometheus instance.

Minimum length: 1.

Maximum length: 128.

ArchiveDuration

Integer

No

No

The archive duration.

Minimum value: 0.

Maximum value: 3650.

AuthFreeReadPolicy

String

No

No

The authentication-free read policy.

None

AuthFreeWritePolicy

String

No

No

The authentication-free write policy.

None

BasicMetricQueryLimit

Boolean

No

No

The basic metric query limit.

None

EnableAuthFreeRead

Boolean

No

No

Specifies whether to enable authentication-free read.

None

EnableAuthFreeWrite

Boolean

No

No

Specifies whether to enable authentication-free write.

None

EnableAuthToken

Boolean

No

No

Specifies whether to enable authentication tokens.

None

PaymentType

String

No

No

The payment type.

Allowed values:

  • POSTPAY

  • POSTPAY_GB

ResourceGroupId

String

No

No

The ID of the resource group.

None

Status

String

No

No

The status of the instance.

None

StorageDuration

Integer

No

No

The storage duration.

Allowed values:

  • 15

  • 30

  • 60

  • 90

  • 180

Workspace

String

No

No

The workspace.

None

Return values

Use Fn::GetAtt to retrieve the values of the following attributes.

  • PushGatewayIntraUrl: The Push Gateway private URL.

  • RemoteReadIntraUrl: The Remote Read private URL.

  • RemoteReadInterUrl: The Remote Read public URL.

  • PrometheusInstanceId: The ID of the Prometheus instance.

  • PushGatewayInterUrl: The Push Gateway public URL.

  • HttpApiIntraUrl: The HTTP API private URL.

  • RemoteWriteIntraUrl: The Remote Write private URL.

  • RemoteWriteInterUrl: The Remote Write public URL.

  • HttpApiInterUrl: The HTTP API public URL.

Examples

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  ArchiveDuration:
    Type: Number
    Description:
      en: The archive duration.
    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.
    Default: Null
    Required: false
  AuthFreeWritePolicy:
    Type: String
    Description:
      en: The authentication-free write policy.
    Default: Null
    Required: false
  EnableAuthFreeRead:
    Type: Boolean
    Description:
      en: Specifies whether to enable authentication-free read.
    Default: Null
    Required: false
  EnableAuthFreeWrite:
    Type: Boolean
    Description:
      en: Specifies whether to enable authentication-free write.
    Default: Null
    Required: false
  EnableAuthToken:
    Type: Boolean
    Description:
      en: Specifies whether to enable authentication tokens.
    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 instance.
    Default: Null
    Required: false
  BasicMetricQueryLimit:
    Type: Boolean
    Description:
      en: The basic metric query limit.
    Default: Null
    Required: false
  StorageDuration:
    Type: Number
    Description:
      en: The storage duration.
    AllowedValues:
      - 15
      - 30
      - 60
      - 90
      - 180
    Default: Null
    Required: false
  Workspace:
    Type: String
    Description:
      en: The workspace.
    Default: Null
    Required: false
  PaymentType:
    Type: String
    Description:
      en: The payment type.
    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 private URL.
  HttpApiInterUrl:
    Value:
      Fn::GetAtt:
        - PrometheusInstance
        - HttpApiInterUrl
    Description: The HTTP API public URL.
  RemoteWriteIntraUrl:
    Value:
      Fn::GetAtt:
        - PrometheusInstance
        - RemoteWriteIntraUrl
    Description: The Remote Write private URL.
  RemoteReadIntraUrl:
    Value:
      Fn::GetAtt:
        - PrometheusInstance
        - RemoteReadIntraUrl
    Description: The Remote Read private URL.
  PushGatewayInterUrl:
    Value:
      Fn::GetAtt:
        - PrometheusInstance
        - PushGatewayInterUrl
    Description: The Push Gateway public URL.
  RemoteWriteInterUrl:
    Value:
      Fn::GetAtt:
        - PrometheusInstance
        - RemoteWriteInterUrl
    Description: The Remote Write public URL.
  RemoteReadInterUrl:
    Value:
      Fn::GetAtt:
        - PrometheusInstance
        - RemoteReadInterUrl
    Description: The Remote Read public URL.
  PushGatewayIntraUrl:
    Value:
      Fn::GetAtt:
        - PrometheusInstance
        - PushGatewayIntraUrl
    Description: The Push Gateway private URL.
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "ArchiveDuration": {
      "Type": "Number",
      "Description": {
        "en": "The archive duration."
      },
      "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."
      },
      "Default": null,
      "Required": false
    },
    "AuthFreeWritePolicy": {
      "Type": "String",
      "Description": {
        "en": "The authentication-free write policy."
      },
      "Default": null,
      "Required": false
    },
    "EnableAuthFreeRead": {
      "Type": "Boolean",
      "Description": {
        "en": "Specifies whether to enable authentication-free read."
      },
      "Default": null,
      "Required": false
    },
    "EnableAuthFreeWrite": {
      "Type": "Boolean",
      "Description": {
        "en": "Specifies whether to enable authentication-free write."
      },
      "Default": null,
      "Required": false
    },
    "EnableAuthToken": {
      "Type": "Boolean",
      "Description": {
        "en": "Specifies whether to enable authentication tokens."
      },
      "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 instance."
      },
      "Default": null,
      "Required": false
    },
    "BasicMetricQueryLimit": {
      "Type": "Boolean",
      "Description": {
        "en": "The basic metric query limit."
      },
      "Default": null,
      "Required": false
    },
    "StorageDuration": {
      "Type": "Number",
      "Description": {
        "en": "The storage duration."
      },
      "AllowedValues": [
        15,
        30,
        60,
        90,
        180
      ],
      "Default": null,
      "Required": false
    },
    "Workspace": {
      "Type": "String",
      "Description": {
        "en": "The workspace."
      },
      "Default": null,
      "Required": false
    },
    "PaymentType": {
      "Type": "String",
      "Description": {
        "en": "The payment type."
      },
      "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 private URL."
    },
    "HttpApiInterUrl": {
      "Value": {
        "Fn::GetAtt": [
          "PrometheusInstance",
          "HttpApiInterUrl"
        ]
      },
      "Description": "The HTTP API public URL."
    },
    "RemoteWriteIntraUrl": {
      "Value": {
        "Fn::GetAtt": [
          "PrometheusInstance",
          "RemoteWriteIntraUrl"
        ]
      },
      "Description": "The Remote Write private URL."
    },
    "RemoteReadIntraUrl": {
      "Value": {
        "Fn::GetAtt": [
          "PrometheusInstance",
          "RemoteReadIntraUrl"
        ]
      },
      "Description": "The Remote Read private URL."
    },
    "PushGatewayInterUrl": {
      "Value": {
        "Fn::GetAtt": [
          "PrometheusInstance",
          "PushGatewayInterUrl"
        ]
      },
      "Description": "The Push Gateway public URL."
    },
    "RemoteWriteInterUrl": {
      "Value": {
        "Fn::GetAtt": [
          "PrometheusInstance",
          "RemoteWriteInterUrl"
        ]
      },
      "Description": "The Remote Write public URL."
    },
    "RemoteReadInterUrl": {
      "Value": {
        "Fn::GetAtt": [
          "PrometheusInstance",
          "RemoteReadInterUrl"
        ]
      },
      "Description": "The Remote Read public URL."
    },
    "PushGatewayIntraUrl": {
      "Value": {
        "Fn::GetAtt": [
          "PrometheusInstance",
          "PushGatewayIntraUrl"
        ]
      },
      "Description": "The Push Gateway private URL."
    }
  }
}