Nota
L'accesso a questa pagina richiede l'autorizzazione. È possibile provare ad accedere o modificare le directory.
L'accesso a questa pagina richiede l'autorizzazione. È possibile provare a modificare le directory.
Definizione di risorsa Bicep
Il tipo di risorsa sourcecontrols può essere distribuito con operazioni destinate a:
Per un elenco delle proprietà modificate in ogni versione dell'API, vedere log delle modifiche.
Esempi di utilizzo
Esempi di Bicep
Esempio di base di distribuzione del token GitHub del servizio app.
targetScope = 'tenant'
param resourceName string = 'acctest0001'
param location string = 'eastus'
@secure()
@description('The GitHub access token for source control integration')
param githubToken string
@secure()
@description('The GitHub token secret for source control integration')
param githubTokenSecret string
resource sourcecontrol 'Microsoft.Web/sourcecontrols@2021-02-01' = {
name: 'GitHub'
properties: {
token: githubToken
tokenSecret: githubTokenSecret
}
}
Formato risorsa
Per creare una risorsa Microsoft.Web/sourcecontrols, aggiungere il bicep seguente al modello.
resource symbolicname 'Microsoft.Web/sourcecontrols@2016-03-01' = {
kind: 'string'
name: 'string'
properties: {
expirationTime: 'string'
name: 'string'
refreshToken: 'string'
token: 'string'
tokenSecret: 'string'
}
}
Valori delle proprietà
Microsoft.Web/sourcecontrols
| Nome | Descrizione | Valore |
|---|---|---|
| gentile | Tipo di risorsa. | corda |
| nome | Nome della risorsa | stringa (obbligatorio) |
| proprietà | Proprietà specifiche della risorsa SourceControl | Proprietà SourceControl |
Proprietà SourceControl
| Nome | Descrizione | Valore |
|---|---|---|
| tempo di scadenza | Scadenza del token OAuth. | corda |
| nome | Nome o tipo di controllo del codice sorgente. | corda |
| refreshToken | Token di aggiornamento OAuth. | corda |
| token | Token di accesso OAuth. | corda |
| tokenSecret | Segreto del token di accesso OAuth. | corda |
Definizione di risorsa del modello di Resource Manager
Il tipo di risorsa sourcecontrols può essere distribuito con operazioni destinate a:
- Tenant - Vedi comandi deployment tenant Per un elenco delle proprietà modificate in ogni versione API, vedi il registro delle modifiche.
Esempi di utilizzo
Formato risorsa
Per creare una risorsa Microsoft.Web/sourcecontrols, aggiungere il codice JSON seguente al modello.
{
"type": "Microsoft.Web/sourcecontrols",
"apiVersion": "2016-03-01",
"name": "string",
"kind": "string",
"properties": {
"expirationTime": "string",
"name": "string",
"refreshToken": "string",
"token": "string",
"tokenSecret": "string"
}
}
Valori delle proprietà
Microsoft.Web/sourcecontrols
| Nome | Descrizione | Valore |
|---|---|---|
| versione dell'API | Versione dell'API | '2016-03-01' |
| gentile | Tipo di risorsa. | corda |
| nome | Nome della risorsa | stringa (obbligatorio) |
| proprietà | Proprietà specifiche della risorsa SourceControl | Proprietà SourceControl |
| digitare | Tipo di risorsa | 'Microsoft.Web/sourcecontrols' |
Proprietà SourceControl
| Nome | Descrizione | Valore |
|---|---|---|
| tempo di scadenza | Scadenza del token OAuth. | corda |
| nome | Nome o tipo di controllo del codice sorgente. | corda |
| refreshToken | Token di aggiornamento OAuth. | corda |
| token | Token di accesso OAuth. | corda |
| tokenSecret | Segreto del token di accesso OAuth. | corda |
Definizione di risorsa Terraform (provider AzAPI)
Il tipo di risorsa sourcecontrols può essere distribuito con operazioni destinate a:
- Inquilino Per un elenco delle proprietà modificate in ogni versione dell'API, vedi il registro modifiche.
Esempi di utilizzo
Esempi di Terraform
Esempio di base di distribuzione del token GitHub del servizio app.
terraform {
required_providers {
azapi = {
source = "Azure/azapi"
}
}
}
provider "azapi" {
skip_provider_registration = false
}
variable "resource_name" {
type = string
default = "acctest0001"
}
variable "location" {
type = string
default = "eastus"
}
variable "github_token" {
type = string
description = "The GitHub access token for source control integration"
sensitive = true
}
variable "github_token_secret" {
type = string
description = "The GitHub token secret for source control integration"
sensitive = true
}
resource "azapi_update_resource" "sourcecontrol" {
type = "Microsoft.Web/sourcecontrols@2021-02-01"
parent_id = "/"
name = "GitHub"
body = {
properties = {
token = var.github_token
tokenSecret = var.github_token_secret
}
}
response_export_values = ["*"]
}
Formato risorsa
Per creare una risorsa Microsoft.Web/sourcecontrols, aggiungere il codice Terraform seguente al modello.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.Web/sourcecontrols@2016-03-01"
name = "string"
parent_id = "string"
body = {
kind = "string"
properties = {
expirationTime = "string"
name = "string"
refreshToken = "string"
token = "string"
tokenSecret = "string"
}
}
}
Valori delle proprietà
Microsoft.Web/sourcecontrols
| Nome | Descrizione | Valore |
|---|---|---|
| gentile | Tipo di risorsa. | corda |
| nome | Nome della risorsa | stringa (obbligatorio) |
| proprietà | Proprietà specifiche della risorsa SourceControl | Proprietà SourceControl |
| digitare | Tipo di risorsa | "Microsoft.Web/sourcecontrols@2016-03-01" |
Proprietà SourceControl
| Nome | Descrizione | Valore |
|---|---|---|
| tempo di scadenza | Scadenza del token OAuth. | corda |
| nome | Nome o tipo di controllo del codice sorgente. | corda |
| refreshToken | Token di aggiornamento OAuth. | corda |
| token | Token di accesso OAuth. | corda |
| tokenSecret | Segreto del token di accesso OAuth. | corda |