다음을 통해 공유


Microsoft.Sql 서버/jobAgents/targetGroups

Bicep 리소스 정의

서버/jobAgents/targetGroups 리소스 종류는 다음을 대상으로 하는 작업과 함께 배포할 수 있습니다.

각 API 버전에서 변경된 속성 목록은 변경 로그참조하세요.

리소스 형식

Microsoft.Sql/servers/jobAgents/targetGroups 리소스를 만들려면 템플릿에 다음 Bicep을 추가합니다.

resource symbolicname 'Microsoft.Sql/servers/jobAgents/targetGroups@2025-02-01-preview' = {
  parent: resourceSymbolicName
  name: 'string'
  properties: {
    members: [
      {
        databaseName: 'string'
        elasticPoolName: 'string'
        membershipType: 'string'
        refreshCredential: 'string'
        serverName: 'string'
        shardMapName: 'string'
        type: 'string'
      }
    ]
  }
}

속성 값

Microsoft.Sql/servers/jobAgents/targetGroups

Name Description Value
name 리소스 이름 string(필수)
parent Bicep에서 자식 리소스에 대한 부모 리소스를 지정할 수 있습니다. 자식 리소스가 부모 리소스 외부에서 선언된 경우에만 이 속성을 추가해야 합니다.

자세한 내용은 부모 리소스 외부의 자식 리소스참조하세요.
형식 리소스의 기호 이름: 서버/jobAgents
properties 리소스 속성입니다. JobTargetGroupProperties

JobTarget

Name Description Value
databaseName 대상 데이터베이스 이름입니다. string
elasticPoolName 대상 탄력적 풀 이름입니다. string
membershipType 대상을 그룹에서 포함할지 제외할지 여부입니다. 'Exclude'
'Include'
refreshCredential 대상에 연결하고 대상 내의 데이터베이스 목록을 결정하기 위해 작업 실행 중에 사용되는 자격 증명의 리소스 ID입니다. string
serverName 대상 서버 이름입니다. string
shardMapName 대상 분할된 데이터베이스 맵입니다. string
type 대상 형식입니다. 'SqlDatabase'
'SqlElasticPool'
'SqlServer'
'SqlShardMap'
'TargetGroup'(필수)

JobTargetGroupProperties

Name Description Value
members 대상 그룹의 멤버입니다. JobTarget[](필수)

사용 예제

Bicep 샘플

Elastic Job Target Group 배포의 기본 예입니다.

param resourceName string = 'acctest0001'
param location string = 'centralus'
@secure()
@description('The administrator login password for the SQL server')
param administratorLoginPassword string
@secure()
@description('The password for the SQL job credential')
param jobCredentialPassword string

resource server 'Microsoft.Sql/servers@2023-08-01-preview' = {
  name: '${resourceName}-server'
  location: location
  properties: {
    administratorLogin: '4dm1n157r470r'
    administratorLoginPassword: null
    minimalTlsVersion: '1.2'
    publicNetworkAccess: 'Enabled'
    restrictOutboundNetworkAccess: 'Disabled'
    version: '12.0'
  }
}

resource database 'Microsoft.Sql/servers/databases@2023-08-01-preview' = {
  parent: server
  name: '${resourceName}-db'
  location: location
  properties: {
    autoPauseDelay: 0
    collation: 'SQL_Latin1_General_CP1_CI_AS'
    createMode: 'Default'
    elasticPoolId: ''
    encryptionProtectorAutoRotation: false
    highAvailabilityReplicaCount: 0
    isLedgerOn: false
    licenseType: ''
    maintenanceConfigurationId: '/subscriptions/subscription().subscriptionId/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default'
    minCapacity: 0
    readScale: 'Disabled'
    requestedBackupStorageRedundancy: 'Geo'
    sampleName: ''
    secondaryType: ''
    zoneRedundant: false
  }
  sku: {
    name: 'S1'
  }
}

resource jobAgent 'Microsoft.Sql/servers/jobAgents@2023-08-01-preview' = {
  parent: server
  name: '${resourceName}-job-agent'
  location: location
  properties: {
    databaseId: database.id
  }
  sku: {
    name: 'JA100'
  }
}

resource credential 'Microsoft.Sql/servers/jobAgents/credentials@2023-08-01-preview' = {
  parent: jobAgent
  name: '${resourceName}-job-credential'
  properties: {
    password: null
    username: 'testusername'
  }
}

resource targetGroup 'Microsoft.Sql/servers/jobAgents/targetGroups@2023-08-01-preview' = {
  parent: jobAgent
  name: '${resourceName}-target-group'
  properties: {
    members: []
  }
}

ARM 템플릿 리소스 정의

서버/jobAgents/targetGroups 리소스 종류는 다음을 대상으로 하는 작업과 함께 배포할 수 있습니다.

각 API 버전에서 변경된 속성 목록은 변경 로그참조하세요.

리소스 형식

Microsoft.Sql/servers/jobAgents/targetGroups 리소스를 만들려면 템플릿에 다음 JSON을 추가합니다.

{
  "type": "Microsoft.Sql/servers/jobAgents/targetGroups",
  "apiVersion": "2025-02-01-preview",
  "name": "string",
  "properties": {
    "members": [
      {
        "databaseName": "string",
        "elasticPoolName": "string",
        "membershipType": "string",
        "refreshCredential": "string",
        "serverName": "string",
        "shardMapName": "string",
        "type": "string"
      }
    ]
  }
}

속성 값

Microsoft.Sql/servers/jobAgents/targetGroups

Name Description Value
apiVersion api 버전 '2025-02-01-미리보기'
name 리소스 이름 string(필수)
properties 리소스 속성입니다. JobTargetGroupProperties
type 리소스 종류 'Microsoft.Sql/servers/jobAgents/targetGroups'

JobTarget

Name Description Value
databaseName 대상 데이터베이스 이름입니다. string
elasticPoolName 대상 탄력적 풀 이름입니다. string
membershipType 대상을 그룹에서 포함할지 제외할지 여부입니다. 'Exclude'
'Include'
refreshCredential 대상에 연결하고 대상 내의 데이터베이스 목록을 결정하기 위해 작업 실행 중에 사용되는 자격 증명의 리소스 ID입니다. string
serverName 대상 서버 이름입니다. string
shardMapName 대상 분할된 데이터베이스 맵입니다. string
type 대상 형식입니다. 'SqlDatabase'
'SqlElasticPool'
'SqlServer'
'SqlShardMap'
'TargetGroup'(필수)

JobTargetGroupProperties

Name Description Value
members 대상 그룹의 멤버입니다. JobTarget[](필수)

사용 예제

Terraform(AzAPI 공급자) 리소스 정의

서버/jobAgents/targetGroups 리소스 종류는 다음을 대상으로 하는 작업과 함께 배포할 수 있습니다.

  • 리소스 그룹

각 API 버전에서 변경된 속성 목록은 변경 로그참조하세요.

리소스 형식

Microsoft.Sql/servers/jobAgents/targetGroups 리소스를 만들려면 템플릿에 다음 Terraform을 추가합니다.

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Sql/servers/jobAgents/targetGroups@2025-02-01-preview"
  name = "string"
  parent_id = "string"
  body = {
    properties = {
      members = [
        {
          databaseName = "string"
          elasticPoolName = "string"
          membershipType = "string"
          refreshCredential = "string"
          serverName = "string"
          shardMapName = "string"
          type = "string"
        }
      ]
    }
  }
}

속성 값

Microsoft.Sql/servers/jobAgents/targetGroups

Name Description Value
name 리소스 이름 string(필수)
parent_id 이 리소스의 부모인 리소스의 ID입니다. 유형의 리소스에 대한 ID: 서버/jobAgents
properties 리소스 속성입니다. JobTargetGroupProperties
type 리소스 종류 "Microsoft.Sql/servers/jobAgents/targetGroups@2025-02-01-preview"

JobTarget

Name Description Value
databaseName 대상 데이터베이스 이름입니다. string
elasticPoolName 대상 탄력적 풀 이름입니다. string
membershipType 대상을 그룹에서 포함할지 제외할지 여부입니다. 'Exclude'
'Include'
refreshCredential 대상에 연결하고 대상 내의 데이터베이스 목록을 결정하기 위해 작업 실행 중에 사용되는 자격 증명의 리소스 ID입니다. string
serverName 대상 서버 이름입니다. string
shardMapName 대상 분할된 데이터베이스 맵입니다. string
type 대상 형식입니다. 'SqlDatabase'
'SqlElasticPool'
'SqlServer'
'SqlShardMap'
'TargetGroup'(필수)

JobTargetGroupProperties

Name Description Value
members 대상 그룹의 멤버입니다. JobTarget[](필수)

사용 예제

Terraform 샘플

Elastic Job Target Group 배포의 기본 예입니다.

terraform {
  required_providers {
    azapi = {
      source = "Azure/azapi"
    }
  }
}

provider "azapi" {
  skip_provider_registration = false
}

data "azapi_client_config" "current" {}

variable "resource_name" {
  type    = string
  default = "acctest0001"
}

variable "location" {
  type    = string
  default = "centralus"
}

variable "administrator_login_password" {
  type        = string
  sensitive   = true
  description = "The administrator login password for the SQL server"
}

variable "job_credential_password" {
  type        = string
  sensitive   = true
  description = "The password for the SQL job credential"
}

resource "azapi_resource" "resourceGroup" {
  type     = "Microsoft.Resources/resourceGroups@2020-06-01"
  name     = var.resource_name
  location = var.location
}

resource "azapi_resource" "server" {
  type      = "Microsoft.Sql/servers@2023-08-01-preview"
  parent_id = azapi_resource.resourceGroup.id
  name      = "${var.resource_name}-server"
  location  = var.location
  body = {
    properties = {
      administratorLogin            = "4dm1n157r470r"
      administratorLoginPassword    = var.administrator_login_password
      minimalTlsVersion             = "1.2"
      publicNetworkAccess           = "Enabled"
      restrictOutboundNetworkAccess = "Disabled"
      version                       = "12.0"
    }
  }
}

resource "azapi_resource" "database" {
  type      = "Microsoft.Sql/servers/databases@2023-08-01-preview"
  parent_id = azapi_resource.server.id
  name      = "${var.resource_name}-db"
  location  = var.location
  body = {
    properties = {
      autoPauseDelay                   = 0
      collation                        = "SQL_Latin1_General_CP1_CI_AS"
      createMode                       = "Default"
      elasticPoolId                    = ""
      encryptionProtectorAutoRotation  = false
      highAvailabilityReplicaCount     = 0
      isLedgerOn                       = false
      licenseType                      = ""
      maintenanceConfigurationId       = "/subscriptions/${data.azapi_client_config.current.subscription_id}/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default"
      minCapacity                      = 0
      readScale                        = "Disabled"
      requestedBackupStorageRedundancy = "Geo"
      sampleName                       = ""
      secondaryType                    = ""
      zoneRedundant                    = false
    }
    sku = {
      name = "S1"
    }
  }
}

resource "azapi_resource" "jobAgent" {
  type      = "Microsoft.Sql/servers/jobAgents@2023-08-01-preview"
  parent_id = azapi_resource.server.id
  name      = "${var.resource_name}-job-agent"
  location  = var.location
  body = {
    properties = {
      databaseId = azapi_resource.database.id
    }
    sku = {
      name = "JA100"
    }
  }
}

resource "azapi_resource" "credential" {
  type      = "Microsoft.Sql/servers/jobAgents/credentials@2023-08-01-preview"
  parent_id = azapi_resource.jobAgent.id
  name      = "${var.resource_name}-job-credential"
  body = {
    properties = {
      password = var.job_credential_password
      username = "testusername"
    }
  }
}

resource "azapi_resource" "targetGroup" {
  type      = "Microsoft.Sql/servers/jobAgents/targetGroups@2023-08-01-preview"
  parent_id = azapi_resource.jobAgent.id
  name      = "${var.resource_name}-target-group"
  body = {
    properties = {
      members = []
    }
  }
}