Permission class

Provides a resource to manage an AWS Certificate Manager Private Certificate Authorities Permission. Currently, this is only required in order to allow the ACM service to automatically renew certificates issued by a PCA.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const exampleCertificateAuthority = new aws.acmpca.CertificateAuthority("example", {certificateAuthorityConfiguration: {
    subject: {
        commonName: "example.com",
    },
    keyAlgorithm: "RSA_4096",
    signingAlgorithm: "SHA512WITHRSA",
}});
const example = new aws.acmpca.Permission("example", {
    certificateAuthorityArn: exampleCertificateAuthority.arn,
    actions: [
        "IssueCertificate",
        "GetCertificate",
        "ListPermissions",
    ],
    principal: "acm.amazonaws.com",
});
import pulumi
import pulumi_aws as aws

example_certificate_authority = aws.acmpca.CertificateAuthority("example", certificate_authority_configuration={
    "subject": {
        "common_name": "example.com",
    },
    "key_algorithm": "RSA_4096",
    "signing_algorithm": "SHA512WITHRSA",
})
example = aws.acmpca.Permission("example",
    certificate_authority_arn=example_certificate_authority.arn,
    actions=[
        "IssueCertificate",
        "GetCertificate",
        "ListPermissions",
    ],
    principal="acm.amazonaws.com")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var exampleCertificateAuthority = new Aws.Acmpca.CertificateAuthority("example", new()
    {
        CertificateAuthorityConfiguration = new Aws.Acmpca.Inputs.CertificateAuthorityCertificateAuthorityConfigurationArgs
        {
            Subject = new Aws.Acmpca.Inputs.CertificateAuthorityCertificateAuthorityConfigurationSubjectArgs
            {
                CommonName = "example.com",
            },
            KeyAlgorithm = "RSA_4096",
            SigningAlgorithm = "SHA512WITHRSA",
        },
    });

    var example = new Aws.Acmpca.Permission("example", new()
    {
        CertificateAuthorityArn = exampleCertificateAuthority.Arn,
        Actions = new[]
        {
            "IssueCertificate",
            "GetCertificate",
            "ListPermissions",
        },
        Principal = "acm.amazonaws.com",
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/acmpca"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleCertificateAuthority, err := acmpca.NewCertificateAuthority(ctx, "example", &acmpca.CertificateAuthorityArgs{
			CertificateAuthorityConfiguration: &acmpca.CertificateAuthorityCertificateAuthorityConfigurationArgs{
				Subject: &acmpca.CertificateAuthorityCertificateAuthorityConfigurationSubjectArgs{
					CommonName: pulumi.String("example.com"),
				},
				KeyAlgorithm:     pulumi.String("RSA_4096"),
				SigningAlgorithm: pulumi.String("SHA512WITHRSA"),
			},
		})
		if err != nil {
			return err
		}
		_, err = acmpca.NewPermission(ctx, "example", &acmpca.PermissionArgs{
			CertificateAuthorityArn: exampleCertificateAuthority.Arn,
			Actions: pulumi.StringArray{
				pulumi.String("IssueCertificate"),
				pulumi.String("GetCertificate"),
				pulumi.String("ListPermissions"),
			},
			Principal: pulumi.String("acm.amazonaws.com"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_acmpca_permission" "example" {
  certificate_authority_arn = aws_acmpca_certificateauthority.example.arn
  actions                   = ["IssueCertificate", "GetCertificate", "ListPermissions"]
  principal                 = "acm.amazonaws.com"
}
resource "aws_acmpca_certificateauthority" "example" {
  certificate_authority_configuration = {
    subject = {
      common_name = "example.com"
    }
    key_algorithm     = "RSA_4096"
    signing_algorithm = "SHA512WITHRSA"
  }
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.acmpca.CertificateAuthority;
import com.pulumi.aws.acmpca.CertificateAuthorityArgs;
import com.pulumi.aws.acmpca.inputs.CertificateAuthorityCertificateAuthorityConfigurationArgs;
import com.pulumi.aws.acmpca.inputs.CertificateAuthorityCertificateAuthorityConfigurationSubjectArgs;
import com.pulumi.aws.acmpca.Permission;
import com.pulumi.aws.acmpca.PermissionArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 exampleCertificateAuthority = new CertificateAuthority("exampleCertificateAuthority", CertificateAuthorityArgs.builder()
            .certificateAuthorityConfiguration(CertificateAuthorityCertificateAuthorityConfigurationArgs.builder()
                .subject(CertificateAuthorityCertificateAuthorityConfigurationSubjectArgs.builder()
                    .commonName("example.com")
                    .build())
                .keyAlgorithm("RSA_4096")
                .signingAlgorithm("SHA512WITHRSA")
                .build())
            .build());

        var example = new Permission("example", PermissionArgs.builder()
            .certificateAuthorityArn(exampleCertificateAuthority.arn())
            .actions(
                "IssueCertificate",
                "GetCertificate",
                "ListPermissions")
            .principal("acm.amazonaws.com")
            .build());

    }
}
resources:
  example:
    type: aws:acmpca:Permission
    properties:
      certificateAuthorityArn: ${exampleCertificateAuthority.arn}
      actions:
        - IssueCertificate
        - GetCertificate
        - ListPermissions
      principal: acm.amazonaws.com
  exampleCertificateAuthority:
    type: aws:acmpca:CertificateAuthority
    name: example
    properties:
      certificateAuthorityConfiguration:
        subject:
          commonName: example.com
        keyAlgorithm: RSA_4096
        signingAlgorithm: SHA512WITHRSA

Constructors

Permission(String name, {PermissionArgs? args, CustomResourceOptions? options})
Creates a new Permission. name The Pulumi resource name. args Arguments used to configure this Permission. The set of arguments for Permission. options Resource options controlling this resource's behavior.
Permission.reference(String urn)
Creates a typed reference to an existing Permission resource.

Properties

actions ↔ Output<List<String>>
Actions that the specified AWS service principal can use. These include IssueCertificate, GetCertificate, and ListPermissions. Note that in order for ACM to automatically rotate certificates issued by a PCA, it must be granted permission on all 3 actions, as per the example above.
latefinal
certificateAuthorityArn ↔ Output<String>
ARN of the CA that grants the permissions.
latefinal
childResources → Set<Resource>
finalinherited
completionSources ↔ Map<String, IOutputCompletionSource>
latefinalinherited
hashCode → int
The hash code for this object.
no setterinherited
id ↔ Output<String>
getter/setter pairinherited
isCustom → bool
Returns whether this resource is provider-managed.
no setterinherited
isProtected → bool
Returns whether this resource is protected from deletion.
no setterinherited
isRemote → bool
Whether this resource is registered as remote.
no setterinherited
isResourceReference → bool
Whether this instance represents a resource value returned over RPC.
finalinherited
policy ↔ Output<String>
IAM policy that is associated with the permission.
latefinal
principal ↔ Output<String>
AWS service or identity that receives the permission. At this time, the only valid principal is acm.amazonaws.com.
latefinal
region ↔ Output<String>
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
latefinal
resourceTransforms → List<ResourceTransform>
Inherited/explicit async transforms.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sourceAccount ↔ Output<String>
ID of the calling account
latefinal
transformations → List<ResourceTransformation>
Inherited/explicit legacy transformations.
no setterinherited
urn ↔ Output<String>
latefinalinherited

Methods

failId(Object error) → void
Completes this resource ID with an error when registration fails.
inherited
failOutputs(Object error) → void
Completes all output properties with error.
inherited
failUrn(Object error) → void
Completes this resource URN with an error when registration fails.
inherited
getProvider(String moduleMember) → ProviderResource?
Returns provider for moduleMember's package, if configured.
inherited
getResourceName() → String
Returns this resource's logical name.
inherited
getResourceType() → String
Returns this resource's Pulumi type token.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerOutput<T>(String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output<T>
Registers a dynamic output property for this resource.
inherited
resolveId(String? value, {required bool isKnown}) → void
Resolves the provider-assigned ID for this resource.
inherited
resolveOutputs(Struct outputs) → void
Resolves all output properties from a monitor response payload.
inherited
resolveUrn(String value) → void
Resolves this resource's URN once assigned by the engine.
inherited
serializeProperties(Map<String, dynamic> properties) → Future<Struct>
Serializes resource properties for RPC transmission.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

get(String name, Input<String> id, {PermissionState? state, CustomResourceOptions? options}) → Permission
Gets an existing Permission resource's state with the given name and id.