This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.33.0 published on Friday, Mar 22, 2024 by Pulumi
azure-native.sql.JobCredential
Explore with Pulumi AI
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.33.0 published on Friday, Mar 22, 2024 by Pulumi
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.
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 (
"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
new JobCredential(name: string, args: JobCredentialArgs, opts?: CustomResourceOptions);
@overload
def JobCredential(resource_name: str,
opts: Optional[ResourceOptions] = None,
credential_name: Optional[str] = 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)
@overload
def JobCredential(resource_name: str,
args: JobCredentialArgs,
opts: Optional[ResourceOptions] = 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.
- 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.
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}
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.33.0 published on Friday, Mar 22, 2024 by Pulumi