azure-native.sql.JobCredential
Explore with Pulumi AI
A stored credential that can be used by a job to connect to target databases. Azure REST API version: 2021-11-01. Prior API version in Azure Native 1.x: 2020-11-01-preview.
Other available API versions: 2022-11-01-preview, 2023-02-01-preview, 2023-05-01-preview, 2023-08-01-preview, 2024-05-01-preview.
Example Usage
Create or update a credential
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var jobCredential = new AzureNative.Sql.JobCredential("jobCredential", new()
{
CredentialName = "cred1",
JobAgentName = "agent1",
Password = "<password>",
ResourceGroupName = "group1",
ServerName = "server1",
Username = "myuser",
});
});
package main
import (
sql "github.com/pulumi/pulumi-azure-native-sdk/sql/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := sql.NewJobCredential(ctx, "jobCredential", &sql.JobCredentialArgs{
CredentialName: pulumi.String("cred1"),
JobAgentName: pulumi.String("agent1"),
Password: pulumi.String("<password>"),
ResourceGroupName: pulumi.String("group1"),
ServerName: pulumi.String("server1"),
Username: pulumi.String("myuser"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.sql.JobCredential;
import com.pulumi.azurenative.sql.JobCredentialArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var jobCredential = new JobCredential("jobCredential", JobCredentialArgs.builder()
.credentialName("cred1")
.jobAgentName("agent1")
.password("<password>")
.resourceGroupName("group1")
.serverName("server1")
.username("myuser")
.build());
}
}
import pulumi
import pulumi_azure_native as azure_native
job_credential = azure_native.sql.JobCredential("jobCredential",
credential_name="cred1",
job_agent_name="agent1",
password="<password>",
resource_group_name="group1",
server_name="server1",
username="myuser")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const jobCredential = new azure_native.sql.JobCredential("jobCredential", {
credentialName: "cred1",
jobAgentName: "agent1",
password: "<password>",
resourceGroupName: "group1",
serverName: "server1",
username: "myuser",
});
resources:
jobCredential:
type: azure-native:sql:JobCredential
properties:
credentialName: cred1
jobAgentName: agent1
password: <password>
resourceGroupName: group1
serverName: server1
username: myuser
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_name: Optional[str] = None,
password: Optional[str] = None,
resource_group_name: Optional[str] = None,
server_name: Optional[str] = None,
username: Optional[str] = None,
credential_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-native:sql: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 AzureNative.Sql.JobCredential("jobCredentialResource", new()
{
JobAgentName = "string",
Password = "string",
ResourceGroupName = "string",
ServerName = "string",
Username = "string",
CredentialName = "string",
});
example, err := sql.NewJobCredential(ctx, "jobCredentialResource", &sql.JobCredentialArgs{
JobAgentName: pulumi.String("string"),
Password: pulumi.String("string"),
ResourceGroupName: pulumi.String("string"),
ServerName: pulumi.String("string"),
Username: pulumi.String("string"),
CredentialName: pulumi.String("string"),
})
var jobCredentialResource = new JobCredential("jobCredentialResource", JobCredentialArgs.builder()
.jobAgentName("string")
.password("string")
.resourceGroupName("string")
.serverName("string")
.username("string")
.credentialName("string")
.build());
job_credential_resource = azure_native.sql.JobCredential("jobCredentialResource",
job_agent_name="string",
password="string",
resource_group_name="string",
server_name="string",
username="string",
credential_name="string")
const jobCredentialResource = new azure_native.sql.JobCredential("jobCredentialResource", {
jobAgentName: "string",
password: "string",
resourceGroupName: "string",
serverName: "string",
username: "string",
credentialName: "string",
});
type: azure-native:sql:JobCredential
properties:
credentialName: string
jobAgentName: string
password: string
resourceGroupName: string
serverName: 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
The JobCredential resource accepts the following input properties:
- Job
Agent stringName - The name of the job agent.
- Password string
- The credential password.
- Resource
Group stringName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- Server
Name string - The name of the server.
- Username string
- The credential user name.
- Credential
Name string - The name of the credential.
- Job
Agent stringName - The name of the job agent.
- Password string
- The credential password.
- Resource
Group stringName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- Server
Name string - The name of the server.
- Username string
- The credential user name.
- Credential
Name string - The name of the credential.
- job
Agent StringName - The name of the job agent.
- password String
- The credential password.
- resource
Group StringName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- server
Name String - The name of the server.
- username String
- The credential user name.
- credential
Name String - The name of the credential.
- job
Agent stringName - The name of the job agent.
- password string
- The credential password.
- resource
Group stringName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- server
Name string - The name of the server.
- username string
- The credential user name.
- credential
Name string - The name of the credential.
- job_
agent_ strname - The name of the job agent.
- password str
- The credential password.
- resource_
group_ strname - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- server_
name str - The name of the server.
- username str
- The credential user name.
- credential_
name str - The name of the credential.
- job
Agent StringName - The name of the job agent.
- password String
- The credential password.
- resource
Group StringName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- server
Name String - The name of the server.
- username String
- The credential user name.
- credential
Name String - The name of the credential.
Outputs
All input properties are implicitly available as output properties. Additionally, the JobCredential resource produces the following output properties:
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:sql:JobCredential cred1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/credentials/{credentialName}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0