New-AzSqlElasticJobAgent

Creates a new elastic job agent

Syntax

New-AzSqlElasticJobAgent
   [-ResourceGroupName] <String>
   [-ServerName] <String>
   [-DatabaseName] <String>
   [-Name] <String>
   [-Tag <Hashtable>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzSqlElasticJobAgent
   [-DatabaseObject] <AzureSqlDatabaseModel>
   [-Name] <String>
   [-Tag <Hashtable>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzSqlElasticJobAgent
   [-DatabaseResourceId] <String>
   [-Name] <String>
   [-Tag <Hashtable>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The New-AzSqlElasticJobAgent cmdlet creates a new Elastic Job agent

Examples

Example 1

PS C:\> 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

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-DatabaseName

The database name

Type:String
Position:2
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DatabaseObject

The Agent Control Database Object

Type:AzureSqlDatabaseModel
Position:0
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-DatabaseResourceId

The Agent Control Database Resource Id

Type:String
Position:0
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Name

The Agent Name

Type:String
Aliases:AgentName
Position:3
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ResourceGroupName

The resource group name

Type:String
Position:0
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ServerName

The server name

Type:String
Position:1
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Tag

The Agent Tags

Type:Hashtable
Aliases:Tags
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

AzureSqlDatabaseModel

Outputs

Microsoft.Azure.Commands.Sql.ElasticJobs.Model.AzureSqlElasticJobAgentModel