CertificateArgs

data class CertificateArgs(val accountName: Output<String>? = null, val certificate: Output<String>? = null, val format: Output<String>? = null, val password: Output<String>? = null, val resourceGroupName: Output<String>? = null, val thumbprint: Output<String>? = null, val thumbprintAlgorithm: Output<String>? = null) : ConvertibleToJava<CertificateArgs>

Manages a certificate in an Azure Batch account.

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.storage.Account;
import com.pulumi.azure.storage.AccountArgs;
import com.pulumi.azure.batch.Account;
import com.pulumi.azure.batch.AccountArgs;
import com.pulumi.azure.batch.Certificate;
import com.pulumi.azure.batch.CertificateArgs;
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("West Europe")
.build());
var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.accountTier("Standard")
.accountReplicationType("LRS")
.build());
var exampleBatch_accountAccount = new Account("exampleBatch/accountAccount", AccountArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.poolAllocationMode("BatchService")
.storageAccountId(exampleAccount.id())
.storageAccountAuthenticationMode("StorageKeys")
.tags(Map.of("env", "test"))
.build());
var exampleCertificate = new Certificate("exampleCertificate", CertificateArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.accountName(exampleBatch / accountAccount.name())
.certificate(Base64.getEncoder().encodeToString(Files.readAllBytes(Paths.get("certificate.pfx"))))
.format("Pfx")
.password("password")
.thumbprint("42C107874FD0E4A9583292A2F1098E8FE4B2EDDA")
.thumbprintAlgorithm("SHA1")
.build());
}
}

Import

Batch Certificates can be imported using the resource id, e.g.

$ pulumi import azure:batch/certificate:Certificate example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example-rg/providers/Microsoft.Batch/batchAccounts/batch1/certificates/certificate1

Constructors

Link copied to clipboard
fun CertificateArgs(accountName: Output<String>? = null, certificate: Output<String>? = null, format: Output<String>? = null, password: Output<String>? = null, resourceGroupName: Output<String>? = null, thumbprint: Output<String>? = null, thumbprintAlgorithm: Output<String>? = null)

Functions

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

Properties

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

Specifies the name of the Batch account. Changing this forces a new resource to be created.

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

The base64-encoded contents of the certificate.

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

The format of the certificate. Possible values are Cer or Pfx.

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

The password to access the certificate's private key. This can only be specified when format is Pfx.

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

The name of the resource group in which to create the Batch account. Changing this forces a new resource to be created.

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

The thumbprint of the certificate. Changing this forces a new resource to be created.

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

The algorithm of the certificate thumbprint. At this time the only supported value is SHA1. Changing this forces a new resource to be created.