1. Packages
  2. Azure Native
  3. API Docs
  4. sql
  5. JobCredential
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

azure-native logo
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:

    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/{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
    azure-native logo
    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