1. Packages
  2. Azure Native v1
  3. API Docs
  4. sql
  5. JobCredential
These are the docs for Azure Native v1. We recommenend using the latest version, Azure Native v2.
Azure Native v1 v1.104.0 published on Thursday, Jul 6, 2023 by Pulumi

azure-native.sql.JobCredential

Explore with Pulumi AI

azure-native-v1 logo
These are the docs for Azure Native v1. We recommenend using the latest version, Azure Native v2.
Azure Native v1 v1.104.0 published on Thursday, Jul 6, 2023 by Pulumi

    A stored credential that can be used by a job to connect to target databases. API Version: 2020-11-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"
    	"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:      "string",
    	Password:          "string",
    	ResourceGroupName: "string",
    	ServerName:        "string",
    	Username:          "string",
    	CredentialName:    "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

    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:

    JobAgentName string
    The name of the job agent.
    Password string
    The credential password.
    ResourceGroupName string
    The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
    ServerName string
    The name of the server.
    Username string
    The credential user name.
    CredentialName string
    The name of the credential.
    JobAgentName string
    The name of the job agent.
    Password string
    The credential password.
    ResourceGroupName string
    The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
    ServerName string
    The name of the server.
    Username string
    The credential user name.
    CredentialName string
    The name of the credential.
    jobAgentName String
    The name of the job agent.
    password String
    The credential password.
    resourceGroupName String
    The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
    serverName String
    The name of the server.
    username String
    The credential user name.
    credentialName String
    The name of the credential.
    jobAgentName string
    The name of the job agent.
    password string
    The credential password.
    resourceGroupName string
    The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
    serverName string
    The name of the server.
    username string
    The credential user name.
    credentialName string
    The name of the credential.
    job_agent_name str
    The name of the job agent.
    password str
    The credential password.
    resource_group_name str
    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.
    jobAgentName String
    The name of the job agent.
    password String
    The credential password.
    resourceGroupName String
    The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
    serverName String
    The name of the server.
    username String
    The credential user name.
    credentialName 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:

    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Resource name.
    Type string
    Resource type.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Resource name.
    Type string
    Resource type.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    Resource name.
    type String
    Resource type.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    Resource name.
    type string
    Resource type.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    Resource name.
    type str
    Resource type.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    Resource name.
    type String
    Resource type.

    Import

    An existing resource can be imported using its type token, name, and identifier, e.g.

    $ pulumi import azure-native:sql:JobCredential cred1 /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred1 
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    azure-native-v1 pulumi/pulumi-azure-native
    License
    Apache-2.0
    azure-native-v1 logo
    These are the docs for Azure Native v1. We recommenend using the latest version, Azure Native v2.
    Azure Native v1 v1.104.0 published on Thursday, Jul 6, 2023 by Pulumi