1. Packages
  2. AWS
  3. API Docs
  4. acmpca
  5. Permission
AWS v6.73.0 published on Wednesday, Mar 19, 2025 by Pulumi

aws.acmpca.Permission

Explore with Pulumi AI

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: {
    keyAlgorithm: "RSA_4096",
    signingAlgorithm: "SHA512WITHRSA",
    subject: {
        commonName: "example.com",
    },
}});
const example = new aws.acmpca.Permission("example", {
    certificateAuthorityArn: exampleCertificateAuthority.arn,
    actions: [
        "IssueCertificate",
        "GetCertificate",
        "ListPermissions",
    ],
    principal: "acm.amazonaws.com",
});
Copy
import pulumi
import pulumi_aws as aws

example_certificate_authority = aws.acmpca.CertificateAuthority("example", certificate_authority_configuration={
    "key_algorithm": "RSA_4096",
    "signing_algorithm": "SHA512WITHRSA",
    "subject": {
        "common_name": "example.com",
    },
})
example = aws.acmpca.Permission("example",
    certificate_authority_arn=example_certificate_authority.arn,
    actions=[
        "IssueCertificate",
        "GetCertificate",
        "ListPermissions",
    ],
    principal="acm.amazonaws.com")
Copy
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v6/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{
				KeyAlgorithm:     pulumi.String("RSA_4096"),
				SigningAlgorithm: pulumi.String("SHA512WITHRSA"),
				Subject: &acmpca.CertificateAuthorityCertificateAuthorityConfigurationSubjectArgs{
					CommonName: pulumi.String("example.com"),
				},
			},
		})
		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
	})
}
Copy
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
        {
            KeyAlgorithm = "RSA_4096",
            SigningAlgorithm = "SHA512WITHRSA",
            Subject = new Aws.Acmpca.Inputs.CertificateAuthorityCertificateAuthorityConfigurationSubjectArgs
            {
                CommonName = "example.com",
            },
        },
    });

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

});
Copy
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.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 exampleCertificateAuthority = new CertificateAuthority("exampleCertificateAuthority", CertificateAuthorityArgs.builder()
            .certificateAuthorityConfiguration(CertificateAuthorityCertificateAuthorityConfigurationArgs.builder()
                .keyAlgorithm("RSA_4096")
                .signingAlgorithm("SHA512WITHRSA")
                .subject(CertificateAuthorityCertificateAuthorityConfigurationSubjectArgs.builder()
                    .commonName("example.com")
                    .build())
                .build())
            .build());

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

    }
}
Copy
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:
        keyAlgorithm: RSA_4096
        signingAlgorithm: SHA512WITHRSA
        subject:
          commonName: example.com
Copy

Create Permission Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Permission(name: string, args: PermissionArgs, opts?: CustomResourceOptions);
@overload
def Permission(resource_name: str,
               args: PermissionArgs,
               opts: Optional[ResourceOptions] = None)

@overload
def Permission(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               actions: Optional[Sequence[str]] = None,
               certificate_authority_arn: Optional[str] = None,
               principal: Optional[str] = None,
               source_account: Optional[str] = None)
func NewPermission(ctx *Context, name string, args PermissionArgs, opts ...ResourceOption) (*Permission, error)
public Permission(string name, PermissionArgs args, CustomResourceOptions? opts = null)
public Permission(String name, PermissionArgs args)
public Permission(String name, PermissionArgs args, CustomResourceOptions options)
type: aws:acmpca:Permission
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. PermissionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. PermissionArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. PermissionArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. PermissionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. PermissionArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var permissionResource = new Aws.Acmpca.Permission("permissionResource", new()
{
    Actions = new[]
    {
        "string",
    },
    CertificateAuthorityArn = "string",
    Principal = "string",
    SourceAccount = "string",
});
Copy
example, err := acmpca.NewPermission(ctx, "permissionResource", &acmpca.PermissionArgs{
	Actions: pulumi.StringArray{
		pulumi.String("string"),
	},
	CertificateAuthorityArn: pulumi.String("string"),
	Principal:               pulumi.String("string"),
	SourceAccount:           pulumi.String("string"),
})
Copy
var permissionResource = new Permission("permissionResource", PermissionArgs.builder()
    .actions("string")
    .certificateAuthorityArn("string")
    .principal("string")
    .sourceAccount("string")
    .build());
Copy
permission_resource = aws.acmpca.Permission("permissionResource",
    actions=["string"],
    certificate_authority_arn="string",
    principal="string",
    source_account="string")
Copy
const permissionResource = new aws.acmpca.Permission("permissionResource", {
    actions: ["string"],
    certificateAuthorityArn: "string",
    principal: "string",
    sourceAccount: "string",
});
Copy
type: aws:acmpca:Permission
properties:
    actions:
        - string
    certificateAuthorityArn: string
    principal: string
    sourceAccount: string
Copy

Permission Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Permission resource accepts the following input properties:

Actions
This property is required.
Changes to this property will trigger replacement.
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.
CertificateAuthorityArn
This property is required.
Changes to this property will trigger replacement.
string
ARN of the CA that grants the permissions.
Principal
This property is required.
Changes to this property will trigger replacement.
string
AWS service or identity that receives the permission. At this time, the only valid principal is acm.amazonaws.com.
SourceAccount Changes to this property will trigger replacement. string
ID of the calling account
Actions
This property is required.
Changes to this property will trigger replacement.
[]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.
CertificateAuthorityArn
This property is required.
Changes to this property will trigger replacement.
string
ARN of the CA that grants the permissions.
Principal
This property is required.
Changes to this property will trigger replacement.
string
AWS service or identity that receives the permission. At this time, the only valid principal is acm.amazonaws.com.
SourceAccount Changes to this property will trigger replacement. string
ID of the calling account
actions
This property is required.
Changes to this property will trigger replacement.
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.
certificateAuthorityArn
This property is required.
Changes to this property will trigger replacement.
String
ARN of the CA that grants the permissions.
principal
This property is required.
Changes to this property will trigger replacement.
String
AWS service or identity that receives the permission. At this time, the only valid principal is acm.amazonaws.com.
sourceAccount Changes to this property will trigger replacement. String
ID of the calling account
actions
This property is required.
Changes to this property will trigger replacement.
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.
certificateAuthorityArn
This property is required.
Changes to this property will trigger replacement.
string
ARN of the CA that grants the permissions.
principal
This property is required.
Changes to this property will trigger replacement.
string
AWS service or identity that receives the permission. At this time, the only valid principal is acm.amazonaws.com.
sourceAccount Changes to this property will trigger replacement. string
ID of the calling account
actions
This property is required.
Changes to this property will trigger replacement.
Sequence[str]
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.
certificate_authority_arn
This property is required.
Changes to this property will trigger replacement.
str
ARN of the CA that grants the permissions.
principal
This property is required.
Changes to this property will trigger replacement.
str
AWS service or identity that receives the permission. At this time, the only valid principal is acm.amazonaws.com.
source_account Changes to this property will trigger replacement. str
ID of the calling account
actions
This property is required.
Changes to this property will trigger replacement.
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.
certificateAuthorityArn
This property is required.
Changes to this property will trigger replacement.
String
ARN of the CA that grants the permissions.
principal
This property is required.
Changes to this property will trigger replacement.
String
AWS service or identity that receives the permission. At this time, the only valid principal is acm.amazonaws.com.
sourceAccount Changes to this property will trigger replacement. String
ID of the calling account

Outputs

All input properties are implicitly available as output properties. Additionally, the Permission resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Policy string
IAM policy that is associated with the permission.
Id string
The provider-assigned unique ID for this managed resource.
Policy string
IAM policy that is associated with the permission.
id String
The provider-assigned unique ID for this managed resource.
policy String
IAM policy that is associated with the permission.
id string
The provider-assigned unique ID for this managed resource.
policy string
IAM policy that is associated with the permission.
id str
The provider-assigned unique ID for this managed resource.
policy str
IAM policy that is associated with the permission.
id String
The provider-assigned unique ID for this managed resource.
policy String
IAM policy that is associated with the permission.

Look up Existing Permission Resource

Get an existing Permission resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: PermissionState, opts?: CustomResourceOptions): Permission
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        actions: Optional[Sequence[str]] = None,
        certificate_authority_arn: Optional[str] = None,
        policy: Optional[str] = None,
        principal: Optional[str] = None,
        source_account: Optional[str] = None) -> Permission
func GetPermission(ctx *Context, name string, id IDInput, state *PermissionState, opts ...ResourceOption) (*Permission, error)
public static Permission Get(string name, Input<string> id, PermissionState? state, CustomResourceOptions? opts = null)
public static Permission get(String name, Output<String> id, PermissionState state, CustomResourceOptions options)
resources:  _:    type: aws:acmpca:Permission    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Actions Changes to this property will trigger replacement. 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.
CertificateAuthorityArn Changes to this property will trigger replacement. string
ARN of the CA that grants the permissions.
Policy string
IAM policy that is associated with the permission.
Principal Changes to this property will trigger replacement. string
AWS service or identity that receives the permission. At this time, the only valid principal is acm.amazonaws.com.
SourceAccount Changes to this property will trigger replacement. string
ID of the calling account
Actions Changes to this property will trigger replacement. []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.
CertificateAuthorityArn Changes to this property will trigger replacement. string
ARN of the CA that grants the permissions.
Policy string
IAM policy that is associated with the permission.
Principal Changes to this property will trigger replacement. string
AWS service or identity that receives the permission. At this time, the only valid principal is acm.amazonaws.com.
SourceAccount Changes to this property will trigger replacement. string
ID of the calling account
actions Changes to this property will trigger replacement. 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.
certificateAuthorityArn Changes to this property will trigger replacement. String
ARN of the CA that grants the permissions.
policy String
IAM policy that is associated with the permission.
principal Changes to this property will trigger replacement. String
AWS service or identity that receives the permission. At this time, the only valid principal is acm.amazonaws.com.
sourceAccount Changes to this property will trigger replacement. String
ID of the calling account
actions Changes to this property will trigger replacement. 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.
certificateAuthorityArn Changes to this property will trigger replacement. string
ARN of the CA that grants the permissions.
policy string
IAM policy that is associated with the permission.
principal Changes to this property will trigger replacement. string
AWS service or identity that receives the permission. At this time, the only valid principal is acm.amazonaws.com.
sourceAccount Changes to this property will trigger replacement. string
ID of the calling account
actions Changes to this property will trigger replacement. Sequence[str]
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.
certificate_authority_arn Changes to this property will trigger replacement. str
ARN of the CA that grants the permissions.
policy str
IAM policy that is associated with the permission.
principal Changes to this property will trigger replacement. str
AWS service or identity that receives the permission. At this time, the only valid principal is acm.amazonaws.com.
source_account Changes to this property will trigger replacement. str
ID of the calling account
actions Changes to this property will trigger replacement. 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.
certificateAuthorityArn Changes to this property will trigger replacement. String
ARN of the CA that grants the permissions.
policy String
IAM policy that is associated with the permission.
principal Changes to this property will trigger replacement. String
AWS service or identity that receives the permission. At this time, the only valid principal is acm.amazonaws.com.
sourceAccount Changes to this property will trigger replacement. String
ID of the calling account

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.