你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Microsoft.ApiManagement service/portalconfigs 2022-04-01-preview

Bicep 资源定义

服务/门户配置资源类型可以使用以下目标操作进行部署:

有关每个 API 版本中更改的属性的列表,请参阅 更改日志

资源格式

若要创建 Microsoft.ApiManagement/service/portalconfigs 资源,请将以下 Bicep 添加到模板。

resource symbolicname 'Microsoft.ApiManagement/service/portalconfigs@2022-04-01-preview' = {
  name: 'string'
  parent: resourceSymbolicName
  properties: {
    cors: {
      allowedOrigins: [
        'string'
      ]
    }
    csp: {
      allowedSources: [
        'string'
      ]
      mode: 'string'
      reportUri: [
        'string'
      ]
    }
    delegation: {
      delegateRegistration: bool
      delegateSubscription: bool
      delegationUrl: 'string'
      validationKey: 'string'
    }
    enableBasicAuth: bool
    signin: {
      require: bool
    }
    signup: {
      termsOfService: {
        requireConsent: bool
        text: 'string'
      }
    }
  }
}

属性值

service/portalconfigs

名称 说明
name 资源名称

了解如何在 Bicep 中为子资源设置名称和类型。
字符串 (必需)
父级 (parent) 在 Bicep 中,可以为子资源指定父资源。 仅当子资源在父资源外部声明时,才需要添加此属性。

有关详细信息,请参阅 父资源之外的子资源
类型为“服务”的资源的符号名称
properties 开发人员门户配置协定属性。 PortalConfigProperties

PortalConfigProperties

名称 说明
cors 开发人员门户跨域资源共享 (CORS) 设置。 PortalConfigCorsProperties
Csp 开发人员门户内容安全策略 (CSP) 设置。 PortalConfigCspProperties
委托 开发人员门户委派设置。 PortalConfigDelegationProperties
enableBasicAuth 启用或禁用基本身份验证方法。 bool
signin PortalConfigPropertiesSignin
报名 PortalConfigPropertiesSignup

PortalConfigCorsProperties

名称 说明
allowedOrigins 允许的源,例如 https://trusted.com string[]

PortalConfigCspProperties

名称 说明
allowedSources 允许的源,例如 *.trusted.com、、 trusted.comhttps:// string[]
mode 开发人员门户内容安全策略的模式 (CSP) 。 “disabled”
“enabled”
“reportOnly”
reportUri 浏览器用于报告 CSP 冲突的 URL。 string[]

PortalConfigDelegationProperties

名称 说明
delegateRegistration 启用或禁用用户注册的委派。 bool
delegateSubscription 启用或禁用产品订阅的委派。 bool
delegationUrl 委派终结点 URL。 字符串
validationKey base64 编码的验证密钥,可确保请求源自 Azure API 管理服务。 字符串

PortalConfigPropertiesSignin

名称 说明
require 将匿名用户重定向到登录页。 bool

PortalConfigPropertiesSignup

名称 说明
termsOfService 服务条款设置。 PortalConfigTermsOfServiceProperties

PortalConfigTermsOfServiceProperties

名称 说明
requireConsent 要求用户同意服务条款。 bool
text 服务条款文本。 字符串

ARM 模板资源定义

可以使用面向以下操作部署 service/portalconfigs 资源类型:

有关每个 API 版本中已更改属性的列表,请参阅 更改日志

资源格式

若要创建 Microsoft.ApiManagement/service/portalconfigs 资源,请将以下 JSON 添加到模板。

{
  "type": "Microsoft.ApiManagement/service/portalconfigs",
  "apiVersion": "2022-04-01-preview",
  "name": "string",
  "properties": {
    "cors": {
      "allowedOrigins": [ "string" ]
    },
    "csp": {
      "allowedSources": [ "string" ],
      "mode": "string",
      "reportUri": [ "string" ]
    },
    "delegation": {
      "delegateRegistration": "bool",
      "delegateSubscription": "bool",
      "delegationUrl": "string",
      "validationKey": "string"
    },
    "enableBasicAuth": "bool",
    "signin": {
      "require": "bool"
    },
    "signup": {
      "termsOfService": {
        "requireConsent": "bool",
        "text": "string"
      }
    }
  }
}

属性值

service/portalconfigs

名称 说明 Value
type 资源类型 “Microsoft.ApiManagement/service/portalconfigs”
apiVersion 资源 API 版本 '2022-04-01-preview'
name 资源名称

了解如何在 JSON ARM 模板中设置子资源的名称和类型。
字符串 (必需)
properties 开发人员门户配置协定属性。 PortalConfigProperties

PortalConfigProperties

名称 说明
cors 开发人员门户跨域资源共享 (CORS) 设置。 PortalConfigCorsProperties
Csp 开发人员门户内容安全策略 (CSP) 设置。 PortalConfigCspProperties
委托 开发人员门户委派设置。 PortalConfigDelegationProperties
enableBasicAuth 启用或禁用基本身份验证方法。 bool
signin PortalConfigPropertiesSignin
报名 PortalConfigPropertiesSignup

PortalConfigCorsProperties

名称 说明
allowedOrigins 允许的来源,例如 https://trusted.com string[]

PortalConfigCspProperties

名称 说明
allowedSources 允许的源,例如 *.trusted.com、、trusted.comhttps:// string[]
mode 开发人员门户内容安全策略的模式 (CSP) 。 'disabled'
'enabled'
'reportOnly'
reportUri 浏览器用于报告 CSP 冲突的 URL。 string[]

PortalConfigDelegationProperties

名称 说明
delegateRegistration 启用或禁用用户注册的委派。 bool
delegateSubscription 启用或禁用产品订阅的委派。 bool
delegationUrl 委派终结点 URL。 字符串
validationKey 一个 base64 编码的验证密钥,用于确保请求源自 Azure API 管理服务。 字符串

PortalConfigPropertiesSignin

名称 说明
require 将匿名用户重定向到登录页。 bool

PortalConfigPropertiesSignup

名称 说明
termsOfService 服务条款设置。 PortalConfigTermsOfServiceProperties

PortalConfigTermsOfServiceProperties

名称 说明
requireConsent 要求用户同意服务条款。 bool
text 服务条款文本。 字符串

Terraform (AzAPI 提供程序) 资源定义

服务/门户配置资源类型可以使用以下目标操作进行部署:

  • 资源组

有关每个 API 版本中更改的属性的列表,请参阅 更改日志

资源格式

若要创建 Microsoft.ApiManagement/service/portalconfigs 资源,请将以下 Terraform 添加到模板。

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.ApiManagement/service/portalconfigs@2022-04-01-preview"
  name = "string"
  parent_id = "string"
  body = jsonencode({
    properties = {
      cors = {
        allowedOrigins = [
          "string"
        ]
      }
      csp = {
        allowedSources = [
          "string"
        ]
        mode = "string"
        reportUri = [
          "string"
        ]
      }
      delegation = {
        delegateRegistration = bool
        delegateSubscription = bool
        delegationUrl = "string"
        validationKey = "string"
      }
      enableBasicAuth = bool
      signin = {
        require = bool
      }
      signup = {
        termsOfService = {
          requireConsent = bool
          text = "string"
        }
      }
    }
  })
}

属性值

service/portalconfigs

名称 说明 Value
type 资源类型 “Microsoft.ApiManagement/service/portalconfigs@2022-04-01-preview”
name 资源名称 字符串 (必需)
parent_id 此资源的父资源 ID。 类型为“服务”的资源的 ID
properties 开发人员门户配置协定属性。 PortalConfigProperties

PortalConfigProperties

名称 说明
cors 开发人员门户跨域资源共享 (CORS) 设置。 PortalConfigCorsProperties
Csp 开发人员门户内容安全策略 (CSP) 设置。 PortalConfigCspProperties
委托 开发人员门户委派设置。 PortalConfigDelegationProperties
enableBasicAuth 启用或禁用基本身份验证方法。 bool
signin PortalConfigPropertiesSignin
报名 PortalConfigPropertiesSignup

PortalConfigCorsProperties

名称 说明
allowedOrigins 允许的源,例如 https://trusted.com string[]

PortalConfigCspProperties

名称 说明
allowedSources 允许的源,例如 *.trusted.com、、 trusted.comhttps:// string[]
mode 开发人员门户内容安全策略的模式 (CSP) 。 "disabled"
"enabled"
“reportOnly”
reportUri 浏览器用于报告 CSP 冲突的 URL。 string[]

PortalConfigDelegationProperties

名称 说明
delegateRegistration 启用或禁用用户注册的委派。 bool
delegateSubscription 启用或禁用产品订阅的委派。 bool
delegationUrl 委派终结点 URL。 字符串
validationKey base64 编码的验证密钥,可确保请求源自 Azure API 管理服务。 字符串

PortalConfigPropertiesSignin

名称 说明
require 将匿名用户重定向到登录页。 bool

PortalConfigPropertiesSignup

名称 说明
termsOfService 服务条款设置。 PortalConfigTermsOfServiceProperties

PortalConfigTermsOfServiceProperties

名称 说明
requireConsent 要求用户同意服务条款。 bool
text 服务条款文本。 字符串