JobCredentialArgs

data class JobCredentialArgs(val jobAgentId: Output<String>? = null, val name: Output<String>? = null, val password: Output<String>? = null, val username: Output<String>? = null) : ConvertibleToJava<JobCredentialArgs>

Manages an Elastic Job Credential.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.mssql.Server;
import com.pulumi.azure.mssql.ServerArgs;
import com.pulumi.azure.mssql.Database;
import com.pulumi.azure.mssql.DatabaseArgs;
import com.pulumi.azure.mssql.JobAgent;
import com.pulumi.azure.mssql.JobAgentArgs;
import com.pulumi.azure.mssql.JobCredential;
import com.pulumi.azure.mssql.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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("northeurope")
.build());
var exampleServer = new Server("exampleServer", ServerArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.version("12.0")
.administratorLogin("4dm1n157r470r")
.administratorLoginPassword("4-v3ry-53cr37-p455w0rd")
.build());
var exampleDatabase = new Database("exampleDatabase", DatabaseArgs.builder()
.serverId(exampleServer.id())
.collation("SQL_Latin1_General_CP1_CI_AS")
.skuName("S1")
.build());
var exampleJobAgent = new JobAgent("exampleJobAgent", JobAgentArgs.builder()
.location(exampleResourceGroup.location())
.databaseId(exampleDatabase.id())
.build());
var exampleJobCredential = new JobCredential("exampleJobCredential", JobCredentialArgs.builder()
.jobAgentId(exampleJobAgent.id())
.username("my-username")
.password("MyP4ssw0rd!!!")
.build());
}
}

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

Constructors

Link copied to clipboard
fun JobCredentialArgs(jobAgentId: Output<String>? = null, name: Output<String>? = null, password: Output<String>? = null, username: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): JobCredentialArgs

Properties

Link copied to clipboard
val jobAgentId: Output<String>? = null

The ID of the Elastic Job Agent. Changing this forces a new Elastic Job Credential to be created.

Link copied to clipboard
val name: Output<String>? = null

The name which should be used for this Elastic Job Credential. Changing this forces a new Elastic Job Credential to be created.

Link copied to clipboard
val password: Output<String>? = null

The password part of the credential.

Link copied to clipboard
val username: Output<String>? = null

The username part of the credential.