すべてのプロダクト
Search
ドキュメントセンター

Resource Orchestration Service:DATASOURCE::OOS::GitCodeRepo

最終更新日:Mar 17, 2025

DATASOURCE::OOS::GitCodeRepo は、ユーザー指定の GitHub または Gitee コードリポジトリの URL を生成するために使用されます。

構文

{
  "Type": "DATASOURCE::OOS::GitCodeRepo",
  "Properties": {
    "Owner": String,
    "Platform": String,
    "Repository": String,
    "CommitId": String,
    "Organization": String,
    "RefreshOptions": String
  }
}

プロパティ

プロパティ

タイプ

必須

編集可能

説明

制約

Owner

String

はい

いいえ

Git アカウント。

なし。

Platform

String

はい

いいえ

プラットフォーム。

有効な値:

  • github

  • gitee

Repository

String

はい

いいえ

リポジトリ名。

なし。

CommitId

String

いいえ

はい

コミット ID。

なし。

Organization

String

いいえ

いいえ

Git 組織の名前。

なし。

RefreshOptions

String

いいえ

はい

スタックが更新されたときのデータソースリソースのリフレッシュポリシー。

有効な値:

  • Never (デフォルト): スタックが更新されたときにデータソースリソースをリフレッシュしません。

  • Always: スタックが更新されたときにデータソースリソースをリフレッシュします。

戻り値

Fn::GetAtt

AuthorizedUrl: 指定された GitHub または Gitee コードリポジトリの URL。

  • YAML 形式

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      Repository:
        Type: String
        Description:
          en: Git repository.
        Required: true
      Owner:
        Type: String
        Description:
          en: Git account.
        Required: true
      Platform:
        Type: String
        Description:
          en: Git platform.
        AllowedValues:
          - github
          - gitee
        Required: true
    Resources:
      GitCodeRepo:
        Type: DATASOURCE::OOS::GitCodeRepo
        Properties:
          Repository:
            Ref: Repository
          Owner:
            Ref: Owner
          Platform:
            Ref: Platform
    Outputs:
      AuthorizedUrl:
        Description: Authorized url.
        Value:
          Fn::GetAtt:
            - GitCodeRepo
            - AuthorizedUrl
  • JSON 形式

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "Repository": {
          "Type": "String",
          "Description": {
            "en": "Git repository."
          },
          "Required": true
        },
        "Owner": {
          "Type": "String",
          "Description": {
            "en": "Git account."
          },
          "Required": true
        },
        "Platform": {
          "Type": "String",
          "Description": {
            "en": "Git platform."
          },
          "AllowedValues": [
            "github",
            "gitee"
          ],
          "Required": true
        }
      },
      "Resources": {
        "GitCodeRepo": {
          "Type": "DATASOURCE::OOS::GitCodeRepo",
          "Properties": {
            "Repository": {
              "Ref": "Repository"
            },
            "Owner": {
              "Ref": "Owner"
            },
            "Platform": {
              "Ref": "Platform"
            }
          }
        }
      },
      "Outputs": {
        "AuthorizedUrl": {
          "Description": "承認済み URL。",
          "Value": {
            "Fn::GetAtt": [
              "GitCodeRepo",
              "AuthorizedUrl"
            ]
          }
        }
      }
    }