New-AzSqlElasticJobAgent
Creates a new elastic job agent
Syntax
DefaultSet (Default)
New-AzSqlElasticJobAgent
[-ResourceGroupName] <String>
[-ServerName] <String>
[-DatabaseName] <String>
[-Name] <String>
[-Tag <Hashtable>]
[-UserAssignedIdentityId <String[]>]
[-IdentityType <String>]
[-WorkerCount <Int32>]
[-SkuName <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
ObjectSet
New-AzSqlElasticJobAgent
[-DatabaseObject] <AzureSqlDatabaseModel>
[-Name] <String>
[-Tag <Hashtable>]
[-UserAssignedIdentityId <String[]>]
[-IdentityType <String>]
[-WorkerCount <Int32>]
[-SkuName <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
ResourceIdSet
New-AzSqlElasticJobAgent
[-DatabaseResourceId] <String>
[-Name] <String>
[-Tag <Hashtable>]
[-UserAssignedIdentityId <String[]>]
[-IdentityType <String>]
[-WorkerCount <Int32>]
[-SkuName <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The New-AzSqlElasticJobAgent cmdlet creates a new Elastic Job agent
Examples
Example 1
New-AzSqlElasticJobAgent -ResourceGroupName rg -ServerName elasticjobserver -DatabaseName jobdb -Name agent
ResourceGroupName ServerName DatabaseName AgentName State Tags
----------------- ---------- ------------ --------- ----- ----
rg elasticjobserver jobdb agent Ready
Creates a new Elastic Job agent
Example 2
$umi = Get-AzUserAssignedIdentity -ResourceGroupName rg -Name pstestumi
New-AzSqlElasticJobAgent -ResourceGroupName rg -ServerName elasticjobserver -DatabaseName jobdb -Name agent -IdentityType "UserAssigned" -UserAssignedIdentityId $umi.Id -SkuName JA200 -WorkerCount 200
ResourceGroupName ServerName DatabaseName AgentName State Tags
----------------- ---------- ------------ --------- ----- ----
rg elasticjobserver jobdb agent Ready
Creates a new Elastic Job agent with specific Sku and Identity
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: SwitchParameter
Default value: False
Supports wildcards: False
DontShow: False
Aliases: cf
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DatabaseName
The database name
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
DefaultSet
Position: 2
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DatabaseObject
The Agent Control Database Object
Parameter properties
Parameter sets
ObjectSet
Position: 0
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-DatabaseResourceId
The Agent Control Database Resource Id
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ResourceIdSet
Position: 0
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Parameter properties
Type: IAzureContextContainer
Default value: None
Supports wildcards: False
DontShow: False
Aliases: AzContext, AzureRmContext, AzureCredential
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-IdentityType
Type of Identity to be used. Possible values are UserAssigned and None.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Name
The Agent Name
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: AgentName
Parameter sets
(All)
Position: 3
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ResourceGroupName
The resource group name
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
DefaultSet
Position: 0
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ServerName
The server name
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
DefaultSet
Position: 1
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-SkuName
The name of the service objective to assign to the Azure SQL Job Agent.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: RequestedServiceObjectiveName
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Tag
The Agent Tags
Parameter properties
Type: Hashtable
Default value: None
Supports wildcards: False
DontShow: False
Aliases: Tags
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-UserAssignedIdentityId
List of user assigned identities
Parameter properties
Type: String [ ]
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
Parameter properties
Type: SwitchParameter
Default value: False
Supports wildcards: False
DontShow: False
Aliases: wi
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-WorkerCount
WorkerCount is the capacity of the Azure SQL Job Agent which controls the number of concurrent targets that can be executed.
Parameter properties
Type: Nullable<T> [ Int32 ]
Default value: None
Supports wildcards: False
DontShow: False
Aliases: Capacity
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters .
Outputs