1. Packages
  2. AWS Classic
  3. API Docs
  4. acmpca
  5. Permission

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi

aws.acmpca.Permission

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi

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

    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 string
    The unique name of the resource.
    args PermissionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args 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 string
    The unique name of the resource.
    args PermissionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PermissionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args 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",
    });
    
    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"),
    })
    
    var permissionResource = new Permission("permissionResource", PermissionArgs.builder()
        .actions("string")
        .certificateAuthorityArn("string")
        .principal("string")
        .sourceAccount("string")
        .build());
    
    permission_resource = aws.acmpca.Permission("permissionResource",
        actions=["string"],
        certificate_authority_arn="string",
        principal="string",
        source_account="string")
    
    const permissionResource = new aws.acmpca.Permission("permissionResource", {
        actions: ["string"],
        certificateAuthorityArn: "string",
        principal: "string",
        sourceAccount: "string",
    });
    
    type: aws:acmpca:Permission
    properties:
        actions:
            - string
        certificateAuthorityArn: string
        principal: string
        sourceAccount: string
    

    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

    The Permission resource accepts the following input properties:

    Actions 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 string
    ARN of the CA that grants the permissions.
    Principal string
    AWS service or identity that receives the permission. At this time, the only valid principal is acm.amazonaws.com.
    SourceAccount string
    ID of the calling account
    Actions []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 string
    ARN of the CA that grants the permissions.
    Principal string
    AWS service or identity that receives the permission. At this time, the only valid principal is acm.amazonaws.com.
    SourceAccount string
    ID of the calling account
    actions 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 String
    ARN of the CA that grants the permissions.
    principal String
    AWS service or identity that receives the permission. At this time, the only valid principal is acm.amazonaws.com.
    sourceAccount String
    ID of the calling account
    actions 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 string
    ARN of the CA that grants the permissions.
    principal string
    AWS service or identity that receives the permission. At this time, the only valid principal is acm.amazonaws.com.
    sourceAccount string
    ID of the calling account
    actions 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 str
    ARN of the CA that grants the permissions.
    principal str
    AWS service or identity that receives the permission. At this time, the only valid principal is acm.amazonaws.com.
    source_account str
    ID of the calling account
    actions 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 String
    ARN of the CA that grants the permissions.
    principal String
    AWS service or identity that receives the permission. At this time, the only valid principal is acm.amazonaws.com.
    sourceAccount 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)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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 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 string
    ARN of the CA that grants the permissions.
    Policy string
    IAM policy that is associated with the permission.
    Principal string
    AWS service or identity that receives the permission. At this time, the only valid principal is acm.amazonaws.com.
    SourceAccount string
    ID of the calling account
    Actions []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 string
    ARN of the CA that grants the permissions.
    Policy string
    IAM policy that is associated with the permission.
    Principal string
    AWS service or identity that receives the permission. At this time, the only valid principal is acm.amazonaws.com.
    SourceAccount string
    ID of the calling account
    actions 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 String
    ARN of the CA that grants the permissions.
    policy String
    IAM policy that is associated with the permission.
    principal String
    AWS service or identity that receives the permission. At this time, the only valid principal is acm.amazonaws.com.
    sourceAccount String
    ID of the calling account
    actions 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 string
    ARN of the CA that grants the permissions.
    policy string
    IAM policy that is associated with the permission.
    principal string
    AWS service or identity that receives the permission. At this time, the only valid principal is acm.amazonaws.com.
    sourceAccount string
    ID of the calling account
    actions 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 str
    ARN of the CA that grants the permissions.
    policy str
    IAM policy that is associated with the permission.
    principal str
    AWS service or identity that receives the permission. At this time, the only valid principal is acm.amazonaws.com.
    source_account str
    ID of the calling account
    actions 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 String
    ARN of the CA that grants the permissions.
    policy String
    IAM policy that is associated with the permission.
    principal String
    AWS service or identity that receives the permission. At this time, the only valid principal is acm.amazonaws.com.
    sourceAccount 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.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi