com.pulumi.azure.automation.kotlin.CertificateArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-azure-kotlin Show documentation
Show all versions of pulumi-azure-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.automation.kotlin
import com.pulumi.azure.automation.CertificateArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* Manages an Automation Certificate.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* import * as std from "@pulumi/std";
* const example = new azure.core.ResourceGroup("example", {
* name: "example-resources",
* location: "West Europe",
* });
* const exampleAccount = new azure.automation.Account("example", {
* name: "account1",
* location: example.location,
* resourceGroupName: example.name,
* skuName: "Basic",
* });
* const exampleCertificate = new azure.automation.Certificate("example", {
* name: "certificate1",
* resourceGroupName: example.name,
* automationAccountName: exampleAccount.name,
* description: "This is an example certificate",
* base64: std.filebase64({
* input: "certificate.pfx",
* }).then(invoke => invoke.result),
* exportable: true,
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* import pulumi_std as std
* example = azure.core.ResourceGroup("example",
* name="example-resources",
* location="West Europe")
* example_account = azure.automation.Account("example",
* name="account1",
* location=example.location,
* resource_group_name=example.name,
* sku_name="Basic")
* example_certificate = azure.automation.Certificate("example",
* name="certificate1",
* resource_group_name=example.name,
* automation_account_name=example_account.name,
* description="This is an example certificate",
* base64=std.filebase64(input="certificate.pfx").result,
* exportable=True)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* using Std = Pulumi.Std;
* return await Deployment.RunAsync(() =>
* {
* var example = new Azure.Core.ResourceGroup("example", new()
* {
* Name = "example-resources",
* Location = "West Europe",
* });
* var exampleAccount = new Azure.Automation.Account("example", new()
* {
* Name = "account1",
* Location = example.Location,
* ResourceGroupName = example.Name,
* SkuName = "Basic",
* });
* var exampleCertificate = new Azure.Automation.Certificate("example", new()
* {
* Name = "certificate1",
* ResourceGroupName = example.Name,
* AutomationAccountName = exampleAccount.Name,
* Description = "This is an example certificate",
* Base64 = Std.Filebase64.Invoke(new()
* {
* Input = "certificate.pfx",
* }).Apply(invoke => invoke.Result),
* Exportable = true,
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/automation"
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
* "github.com/pulumi/pulumi-std/sdk/go/std"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
* Name: pulumi.String("example-resources"),
* Location: pulumi.String("West Europe"),
* })
* if err != nil {
* return err
* }
* exampleAccount, err := automation.NewAccount(ctx, "example", &automation.AccountArgs{
* Name: pulumi.String("account1"),
* Location: example.Location,
* ResourceGroupName: example.Name,
* SkuName: pulumi.String("Basic"),
* })
* if err != nil {
* return err
* }
* invokeFilebase64, err := std.Filebase64(ctx, &std.Filebase64Args{
* Input: "certificate.pfx",
* }, nil)
* if err != nil {
* return err
* }
* _, err = automation.NewCertificate(ctx, "example", &automation.CertificateArgs{
* Name: pulumi.String("certificate1"),
* ResourceGroupName: example.Name,
* AutomationAccountName: exampleAccount.Name,
* Description: pulumi.String("This is an example certificate"),
* Base64: invokeFilebase64.Result,
* Exportable: pulumi.Bool(true),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* 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.automation.Account;
* import com.pulumi.azure.automation.AccountArgs;
* import com.pulumi.azure.automation.Certificate;
* import com.pulumi.azure.automation.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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
* .name("example-resources")
* .location("West Europe")
* .build());
* var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
* .name("account1")
* .location(example.location())
* .resourceGroupName(example.name())
* .skuName("Basic")
* .build());
* var exampleCertificate = new Certificate("exampleCertificate", CertificateArgs.builder()
* .name("certificate1")
* .resourceGroupName(example.name())
* .automationAccountName(exampleAccount.name())
* .description("This is an example certificate")
* .base64(StdFunctions.filebase64(Filebase64Args.builder()
* .input("certificate.pfx")
* .build()).result())
* .exportable(true)
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: azure:core:ResourceGroup
* properties:
* name: example-resources
* location: West Europe
* exampleAccount:
* type: azure:automation:Account
* name: example
* properties:
* name: account1
* location: ${example.location}
* resourceGroupName: ${example.name}
* skuName: Basic
* exampleCertificate:
* type: azure:automation:Certificate
* name: example
* properties:
* name: certificate1
* resourceGroupName: ${example.name}
* automationAccountName: ${exampleAccount.name}
* description: This is an example certificate
* base64:
* fn::invoke:
* Function: std:filebase64
* Arguments:
* input: certificate.pfx
* Return: result
* exportable: true
* ```
*
* ## Import
* Automation Certificates can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:automation/certificate:Certificate certificate1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Automation/automationAccounts/account1/certificates/certificate1
* ```
* @property automationAccountName The name of the automation account in which the Certificate is created. Changing this forces a new resource to be created.
* @property base64 Base64 encoded value of the certificate. Changing this forces a new resource to be created.
* @property description The description of this Automation Certificate.
* @property exportable The is exportable flag of the certificate.
* @property name Specifies the name of the Certificate. Changing this forces a new resource to be created.
* @property resourceGroupName The name of the resource group in which the Certificate is created. Changing this forces a new resource to be created.
*/
public data class CertificateArgs(
public val automationAccountName: Output? = null,
public val base64: Output? = null,
public val description: Output? = null,
public val exportable: Output? = null,
public val name: Output? = null,
public val resourceGroupName: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azure.automation.CertificateArgs =
com.pulumi.azure.automation.CertificateArgs.builder()
.automationAccountName(automationAccountName?.applyValue({ args0 -> args0 }))
.base64(base64?.applyValue({ args0 -> args0 }))
.description(description?.applyValue({ args0 -> args0 }))
.exportable(exportable?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [CertificateArgs].
*/
@PulumiTagMarker
public class CertificateArgsBuilder internal constructor() {
private var automationAccountName: Output? = null
private var base64: Output? = null
private var description: Output? = null
private var exportable: Output? = null
private var name: Output? = null
private var resourceGroupName: Output? = null
/**
* @param value The name of the automation account in which the Certificate is created. Changing this forces a new resource to be created.
*/
@JvmName("uqjocinwagilnmut")
public suspend fun automationAccountName(`value`: Output) {
this.automationAccountName = value
}
/**
* @param value Base64 encoded value of the certificate. Changing this forces a new resource to be created.
*/
@JvmName("ljmmupximpeqfiaw")
public suspend fun base64(`value`: Output) {
this.base64 = value
}
/**
* @param value The description of this Automation Certificate.
*/
@JvmName("rdlekbwqdvrhklsx")
public suspend fun description(`value`: Output) {
this.description = value
}
/**
* @param value The is exportable flag of the certificate.
*/
@JvmName("rqwcccywdfdjcbyo")
public suspend fun exportable(`value`: Output) {
this.exportable = value
}
/**
* @param value Specifies the name of the Certificate. Changing this forces a new resource to be created.
*/
@JvmName("nwrhuwwcisnkksuu")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value The name of the resource group in which the Certificate is created. Changing this forces a new resource to be created.
*/
@JvmName("tafmfqunswfaslia")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value The name of the automation account in which the Certificate is created. Changing this forces a new resource to be created.
*/
@JvmName("eokeswpaipnslbix")
public suspend fun automationAccountName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.automationAccountName = mapped
}
/**
* @param value Base64 encoded value of the certificate. Changing this forces a new resource to be created.
*/
@JvmName("bmtlugjnerkgrobs")
public suspend fun base64(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.base64 = mapped
}
/**
* @param value The description of this Automation Certificate.
*/
@JvmName("sxonsnwqoiiutled")
public suspend fun description(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.description = mapped
}
/**
* @param value The is exportable flag of the certificate.
*/
@JvmName("wfikootgllwawpuy")
public suspend fun exportable(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.exportable = mapped
}
/**
* @param value Specifies the name of the Certificate. Changing this forces a new resource to be created.
*/
@JvmName("hvuerdvxjfxygkkf")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value The name of the resource group in which the Certificate is created. Changing this forces a new resource to be created.
*/
@JvmName("ygpxwtcxukmkljre")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
internal fun build(): CertificateArgs = CertificateArgs(
automationAccountName = automationAccountName,
base64 = base64,
description = description,
exportable = exportable,
name = name,
resourceGroupName = resourceGroupName,
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy