Certificate

class Certificate : KotlinCustomResource

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

Properties

Link copied to clipboard
val accountName: Output<String>

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

Link copied to clipboard
val certificate: Output<String>

The base64-encoded contents of the certificate.

Link copied to clipboard
val format: Output<String>

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

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val name: Output<String>

The generated name of the certificate.

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

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

Link copied to clipboard
val publicData: Output<String>

The public key of the certificate.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

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>

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

Link copied to clipboard

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

Link copied to clipboard
val urn: Output<String>