We recommend using Azure Native.
published on Monday, Mar 9, 2026 by Pulumi
We recommend using Azure Native.
published on Monday, Mar 9, 2026 by Pulumi
Manages an Elastic Job Credential.
Example Usage
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
{
Location = "northeurope",
});
var exampleServer = new Azure.MSSql.Server("exampleServer", new Azure.MSSql.ServerArgs
{
ResourceGroupName = exampleResourceGroup.Name,
Location = exampleResourceGroup.Location,
Version = "12.0",
AdministratorLogin = "4dm1n157r470r",
AdministratorLoginPassword = "4-v3ry-53cr37-p455w0rd",
});
var exampleDatabase = new Azure.MSSql.Database("exampleDatabase", new Azure.MSSql.DatabaseArgs
{
ServerId = exampleServer.Id,
Collation = "SQL_Latin1_General_CP1_CI_AS",
SkuName = "S1",
});
var exampleJobAgent = new Azure.MSSql.JobAgent("exampleJobAgent", new Azure.MSSql.JobAgentArgs
{
Location = exampleResourceGroup.Location,
DatabaseId = exampleDatabase.Id,
});
var exampleJobCredential = new Azure.MSSql.JobCredential("exampleJobCredential", new Azure.MSSql.JobCredentialArgs
{
JobAgentId = exampleJobAgent.Id,
Username = "my-username",
Password = "MyP4ssw0rd!!!",
});
}
}
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/mssql"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
Location: pulumi.String("northeurope"),
})
if err != nil {
return err
}
exampleServer, err := mssql.NewServer(ctx, "exampleServer", &mssql.ServerArgs{
ResourceGroupName: exampleResourceGroup.Name,
Location: exampleResourceGroup.Location,
Version: pulumi.String("12.0"),
AdministratorLogin: pulumi.String("4dm1n157r470r"),
AdministratorLoginPassword: pulumi.String("4-v3ry-53cr37-p455w0rd"),
})
if err != nil {
return err
}
exampleDatabase, err := mssql.NewDatabase(ctx, "exampleDatabase", &mssql.DatabaseArgs{
ServerId: exampleServer.ID(),
Collation: pulumi.String("SQL_Latin1_General_CP1_CI_AS"),
SkuName: pulumi.String("S1"),
})
if err != nil {
return err
}
exampleJobAgent, err := mssql.NewJobAgent(ctx, "exampleJobAgent", &mssql.JobAgentArgs{
Location: exampleResourceGroup.Location,
DatabaseId: exampleDatabase.ID(),
})
if err != nil {
return err
}
_, err = mssql.NewJobCredential(ctx, "exampleJobCredential", &mssql.JobCredentialArgs{
JobAgentId: exampleJobAgent.ID(),
Username: pulumi.String("my-username"),
Password: pulumi.String("MyP4ssw0rd!!!"),
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "northeurope"});
const exampleServer = new azure.mssql.Server("exampleServer", {
resourceGroupName: exampleResourceGroup.name,
location: exampleResourceGroup.location,
version: "12.0",
administratorLogin: "4dm1n157r470r",
administratorLoginPassword: "4-v3ry-53cr37-p455w0rd",
});
const exampleDatabase = new azure.mssql.Database("exampleDatabase", {
serverId: exampleServer.id,
collation: "SQL_Latin1_General_CP1_CI_AS",
skuName: "S1",
});
const exampleJobAgent = new azure.mssql.JobAgent("exampleJobAgent", {
location: exampleResourceGroup.location,
databaseId: exampleDatabase.id,
});
const exampleJobCredential = new azure.mssql.JobCredential("exampleJobCredential", {
jobAgentId: exampleJobAgent.id,
username: "my-username",
password: "MyP4ssw0rd!!!",
});
import pulumi
import pulumi_azure as azure
example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="northeurope")
example_server = azure.mssql.Server("exampleServer",
resource_group_name=example_resource_group.name,
location=example_resource_group.location,
version="12.0",
administrator_login="4dm1n157r470r",
administrator_login_password="4-v3ry-53cr37-p455w0rd")
example_database = azure.mssql.Database("exampleDatabase",
server_id=example_server.id,
collation="SQL_Latin1_General_CP1_CI_AS",
sku_name="S1")
example_job_agent = azure.mssql.JobAgent("exampleJobAgent",
location=example_resource_group.location,
database_id=example_database.id)
example_job_credential = azure.mssql.JobCredential("exampleJobCredential",
job_agent_id=example_job_agent.id,
username="my-username",
password="MyP4ssw0rd!!!")
Example coming soon!
Create JobCredential Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new JobCredential(name: string, args: JobCredentialArgs, opts?: CustomResourceOptions);@overload
def JobCredential(resource_name: str,
args: JobCredentialArgs,
opts: Optional[ResourceOptions] = None)
@overload
def JobCredential(resource_name: str,
opts: Optional[ResourceOptions] = None,
job_agent_id: Optional[str] = None,
password: Optional[str] = None,
username: Optional[str] = None,
name: Optional[str] = None)func NewJobCredential(ctx *Context, name string, args JobCredentialArgs, opts ...ResourceOption) (*JobCredential, error)public JobCredential(string name, JobCredentialArgs args, CustomResourceOptions? opts = null)
public JobCredential(String name, JobCredentialArgs args)
public JobCredential(String name, JobCredentialArgs args, CustomResourceOptions options)
type: azure:mssql:JobCredential
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args JobCredentialArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args JobCredentialArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args JobCredentialArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args JobCredentialArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args JobCredentialArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var jobCredentialResource = new Azure.MSSql.JobCredential("jobCredentialResource", new()
{
JobAgentId = "string",
Password = "string",
Username = "string",
Name = "string",
});
example, err := mssql.NewJobCredential(ctx, "jobCredentialResource", &mssql.JobCredentialArgs{
JobAgentId: pulumi.String("string"),
Password: pulumi.String("string"),
Username: pulumi.String("string"),
Name: pulumi.String("string"),
})
var jobCredentialResource = new JobCredential("jobCredentialResource", JobCredentialArgs.builder()
.jobAgentId("string")
.password("string")
.username("string")
.name("string")
.build());
job_credential_resource = azure.mssql.JobCredential("jobCredentialResource",
job_agent_id="string",
password="string",
username="string",
name="string")
const jobCredentialResource = new azure.mssql.JobCredential("jobCredentialResource", {
jobAgentId: "string",
password: "string",
username: "string",
name: "string",
});
type: azure:mssql:JobCredential
properties:
jobAgentId: string
name: string
password: string
username: string
JobCredential Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The JobCredential resource accepts the following input properties:
- Job
Agent stringId - The ID of the Elastic Job Agent. Changing this forces a new Elastic Job Credential to be created.
- Password string
- The password part of the credential.
- Username string
- The username part of the credential.
- Name string
- The name which should be used for this Elastic Job Credential. Changing this forces a new Elastic Job Credential to be created.
- Job
Agent stringId - The ID of the Elastic Job Agent. Changing this forces a new Elastic Job Credential to be created.
- Password string
- The password part of the credential.
- Username string
- The username part of the credential.
- Name string
- The name which should be used for this Elastic Job Credential. Changing this forces a new Elastic Job Credential to be created.
- job
Agent StringId - The ID of the Elastic Job Agent. Changing this forces a new Elastic Job Credential to be created.
- password String
- The password part of the credential.
- username String
- The username part of the credential.
- name String
- The name which should be used for this Elastic Job Credential. Changing this forces a new Elastic Job Credential to be created.
- job
Agent stringId - The ID of the Elastic Job Agent. Changing this forces a new Elastic Job Credential to be created.
- password string
- The password part of the credential.
- username string
- The username part of the credential.
- name string
- The name which should be used for this Elastic Job Credential. Changing this forces a new Elastic Job Credential to be created.
- job_
agent_ strid - The ID of the Elastic Job Agent. Changing this forces a new Elastic Job Credential to be created.
- password str
- The password part of the credential.
- username str
- The username part of the credential.
- name str
- The name which should be used for this Elastic Job Credential. Changing this forces a new Elastic Job Credential to be created.
- job
Agent StringId - The ID of the Elastic Job Agent. Changing this forces a new Elastic Job Credential to be created.
- password String
- The password part of the credential.
- username String
- The username part of the credential.
- name String
- The name which should be used for this Elastic Job Credential. Changing this forces a new Elastic Job Credential to be created.
Outputs
All input properties are implicitly available as output properties. Additionally, the JobCredential resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing JobCredential Resource
Get an existing JobCredential resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: JobCredentialState, opts?: CustomResourceOptions): JobCredential@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
job_agent_id: Optional[str] = None,
name: Optional[str] = None,
password: Optional[str] = None,
username: Optional[str] = None) -> JobCredentialfunc GetJobCredential(ctx *Context, name string, id IDInput, state *JobCredentialState, opts ...ResourceOption) (*JobCredential, error)public static JobCredential Get(string name, Input<string> id, JobCredentialState? state, CustomResourceOptions? opts = null)public static JobCredential get(String name, Output<String> id, JobCredentialState state, CustomResourceOptions options)resources: _: type: azure:mssql:JobCredential get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Job
Agent stringId - The ID of the Elastic Job Agent. Changing this forces a new Elastic Job Credential to be created.
- Name string
- The name which should be used for this Elastic Job Credential. Changing this forces a new Elastic Job Credential to be created.
- Password string
- The password part of the credential.
- Username string
- The username part of the credential.
- Job
Agent stringId - The ID of the Elastic Job Agent. Changing this forces a new Elastic Job Credential to be created.
- Name string
- The name which should be used for this Elastic Job Credential. Changing this forces a new Elastic Job Credential to be created.
- Password string
- The password part of the credential.
- Username string
- The username part of the credential.
- job
Agent StringId - The ID of the Elastic Job Agent. Changing this forces a new Elastic Job Credential to be created.
- name String
- The name which should be used for this Elastic Job Credential. Changing this forces a new Elastic Job Credential to be created.
- password String
- The password part of the credential.
- username String
- The username part of the credential.
- job
Agent stringId - The ID of the Elastic Job Agent. Changing this forces a new Elastic Job Credential to be created.
- name string
- The name which should be used for this Elastic Job Credential. Changing this forces a new Elastic Job Credential to be created.
- password string
- The password part of the credential.
- username string
- The username part of the credential.
- job_
agent_ strid - The ID of the Elastic Job Agent. Changing this forces a new Elastic Job Credential to be created.
- name str
- The name which should be used for this Elastic Job Credential. Changing this forces a new Elastic Job Credential to be created.
- password str
- The password part of the credential.
- username str
- The username part of the credential.
- job
Agent StringId - The ID of the Elastic Job Agent. Changing this forces a new Elastic Job Credential to be created.
- name String
- The name which should be used for this Elastic Job Credential. Changing this forces a new Elastic Job Credential to be created.
- password String
- The password part of the credential.
- username String
- The username part of the credential.
Import
Elastic Job Credentials can be imported using the resource id, e.g.
$ pulumi import azure:mssql/jobCredential:JobCredential example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Sql/servers/myserver1/jobAgents/myjobagent1/credentials/credential1
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.
We recommend using Azure Native.
published on Monday, Mar 9, 2026 by Pulumi