Documentation ¶
Index ¶
- func Certificate_IsConstruct(x interface{}) *bool
- func Certificate_IsOwnedResource(construct constructs.IConstruct) *bool
- func Certificate_IsResource(construct constructs.IConstruct) *bool
- func CfnAccount_CFN_RESOURCE_TYPE_NAME() *string
- func CfnAccount_IsCfnElement(x interface{}) *bool
- func CfnAccount_IsCfnResource(x interface{}) *bool
- func CfnAccount_IsConstruct(x interface{}) *bool
- func CfnCertificate_CFN_RESOURCE_TYPE_NAME() *string
- func CfnCertificate_IsCfnElement(x interface{}) *bool
- func CfnCertificate_IsCfnResource(x interface{}) *bool
- func CfnCertificate_IsConstruct(x interface{}) *bool
- func DnsValidatedCertificate_IsConstruct(x interface{}) *bool
- func DnsValidatedCertificate_IsOwnedResource(construct constructs.IConstruct) *bool
- func DnsValidatedCertificate_IsResource(construct constructs.IConstruct) *bool
- func NewCertificate_Override(c Certificate, scope constructs.Construct, id *string, props *CertificateProps)
- func NewCfnAccount_Override(c CfnAccount, scope constructs.Construct, id *string, props *CfnAccountProps)
- func NewCfnCertificate_Override(c CfnCertificate, scope constructs.Construct, id *string, ...)
- func NewDnsValidatedCertificate_Override(d DnsValidatedCertificate, scope constructs.Construct, id *string, ...)deprecated
- func NewKeyAlgorithm_Override(k KeyAlgorithm, name *string)
- func NewPrivateCertificate_Override(p PrivateCertificate, scope constructs.Construct, id *string, ...)
- func PrivateCertificate_IsConstruct(x interface{}) *bool
- func PrivateCertificate_IsOwnedResource(construct constructs.IConstruct) *bool
- func PrivateCertificate_IsResource(construct constructs.IConstruct) *bool
- type Certificate
- type CertificateProps
- type CertificateValidation
- func CertificateValidation_FromDns(hostedZone awsroute53.IHostedZone) CertificateValidation
- func CertificateValidation_FromDnsMultiZone(hostedZones *map[string]awsroute53.IHostedZone) CertificateValidation
- func CertificateValidation_FromEmail(validationDomains *map[string]*string) CertificateValidation
- type CertificationValidationProps
- type CfnAccount
- type CfnAccountProps
- type CfnAccount_ExpiryEventsConfigurationProperty
- type CfnCertificate
- type CfnCertificateProps
- type CfnCertificate_DomainValidationOptionProperty
- type DnsValidatedCertificatedeprecated
- type DnsValidatedCertificateProps
- type ICertificate
- type KeyAlgorithm
- type PrivateCertificate
- type PrivateCertificateProps
- type ValidationMethod
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Certificate_IsConstruct ¶
func Certificate_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`.
func Certificate_IsOwnedResource ¶ added in v2.32.0
func Certificate_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise.
func Certificate_IsResource ¶
func Certificate_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource.
func CfnAccount_CFN_RESOURCE_TYPE_NAME ¶
func CfnAccount_CFN_RESOURCE_TYPE_NAME() *string
func CfnAccount_IsCfnElement ¶
func CfnAccount_IsCfnElement(x interface{}) *bool
Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).
Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.
Returns: The construct as a stack element or undefined if it is not a stack element.
func CfnAccount_IsCfnResource ¶
func CfnAccount_IsCfnResource(x interface{}) *bool
Check whether the given object is a CfnResource.
func CfnAccount_IsConstruct ¶
func CfnAccount_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`.
func CfnCertificate_CFN_RESOURCE_TYPE_NAME ¶
func CfnCertificate_CFN_RESOURCE_TYPE_NAME() *string
func CfnCertificate_IsCfnElement ¶
func CfnCertificate_IsCfnElement(x interface{}) *bool
Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).
Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.
Returns: The construct as a stack element or undefined if it is not a stack element.
func CfnCertificate_IsCfnResource ¶
func CfnCertificate_IsCfnResource(x interface{}) *bool
Check whether the given object is a CfnResource.
func CfnCertificate_IsConstruct ¶
func CfnCertificate_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`.
func DnsValidatedCertificate_IsConstruct ¶
func DnsValidatedCertificate_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use {@link Certificate } instead.
func DnsValidatedCertificate_IsOwnedResource ¶ added in v2.32.0
func DnsValidatedCertificate_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise. Deprecated: use {@link Certificate } instead.
func DnsValidatedCertificate_IsResource ¶
func DnsValidatedCertificate_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource. Deprecated: use {@link Certificate } instead.
func NewCertificate_Override ¶
func NewCertificate_Override(c Certificate, scope constructs.Construct, id *string, props *CertificateProps)
func NewCfnAccount_Override ¶
func NewCfnAccount_Override(c CfnAccount, scope constructs.Construct, id *string, props *CfnAccountProps)
func NewCfnCertificate_Override ¶
func NewCfnCertificate_Override(c CfnCertificate, scope constructs.Construct, id *string, props *CfnCertificateProps)
func NewDnsValidatedCertificate_Override
deprecated
func NewDnsValidatedCertificate_Override(d DnsValidatedCertificate, scope constructs.Construct, id *string, props *DnsValidatedCertificateProps)
Deprecated: use {@link Certificate } instead.
func NewKeyAlgorithm_Override ¶ added in v2.119.0
func NewKeyAlgorithm_Override(k KeyAlgorithm, name *string)
func NewPrivateCertificate_Override ¶
func NewPrivateCertificate_Override(p PrivateCertificate, scope constructs.Construct, id *string, props *PrivateCertificateProps)
func PrivateCertificate_IsConstruct ¶
func PrivateCertificate_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`.
func PrivateCertificate_IsOwnedResource ¶ added in v2.32.0
func PrivateCertificate_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise.
func PrivateCertificate_IsResource ¶
func PrivateCertificate_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource.
Types ¶
type Certificate ¶
type Certificate interface { awscdk.Resource ICertificate // The certificate's ARN. CertificateArn() *string // The environment this resource belongs to. // // For resources that are created and managed by the CDK // (generally, those created by creating new class instances like Role, Bucket, etc.), // this is always the same as the environment of the stack they belong to; // however, for imported resources // (those obtained from static methods like fromRoleArn, fromBucketName, etc.), // that might be different than the stack they were imported into. Env() *awscdk.ResourceEnvironment // The tree node. Node() constructs.Node // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. PhysicalName() *string // If the certificate is provisionned in a different region than the containing stack, this should be the region in which the certificate lives so we can correctly create `Metric` instances. Region() *string // The stack in which this resource is defined. Stack() awscdk.Stack // Apply the given removal policy to this resource. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). ApplyRemovalPolicy(policy awscdk.RemovalPolicy) GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. GetResourceNameAttribute(nameAttr *string) *string // Return the DaysToExpiry metric for this AWS Certificate Manager Certificate. By default, this is the minimum value over 1 day. // // This metric is no longer emitted once the certificate has effectively // expired, so alarms configured on this metric should probably treat missing // data as "breaching". MetricDaysToExpiry(props *awscloudwatch.MetricOptions) awscloudwatch.Metric // Returns a string representation of this construct. ToString() *string }
A certificate managed by AWS Certificate Manager.
Example:
pool := cognito.NewUserPool(this, jsii.String("Pool")) pool.addDomain(jsii.String("CognitoDomain"), &UserPoolDomainOptions{ CognitoDomain: &CognitoDomainOptions{ DomainPrefix: jsii.String("my-awesome-app"), }, }) certificateArn := "arn:aws:acm:us-east-1:123456789012:certificate/11-3336f1-44483d-adc7-9cd375c5169d" domainCert := certificatemanager.Certificate_FromCertificateArn(this, jsii.String("domainCert"), certificateArn) pool.addDomain(jsii.String("CustomDomain"), &UserPoolDomainOptions{ CustomDomain: &CustomDomainOptions{ DomainName: jsii.String("user.myapp.com"), Certificate: domainCert, }, })
func NewCertificate ¶
func NewCertificate(scope constructs.Construct, id *string, props *CertificateProps) Certificate
type CertificateProps ¶
type CertificateProps struct { // Fully-qualified domain name to request a certificate for. // // May contain wildcards, such as “*.domain.com“. DomainName *string `field:"required" json:"domainName" yaml:"domainName"` // The Certificate name. // // Since the Certificate resource doesn't support providing a physical name, the value provided here will be recorded in the `Name` tag. // Default: the full, absolute path of this construct. // CertificateName *string `field:"optional" json:"certificateName" yaml:"certificateName"` // Specifies the algorithm of the public and private key pair that your certificate uses to encrypt data. // See: https://docs.aws.amazon.com/acm/latest/userguide/acm-certificate.html#algorithms.title // // Default: KeyAlgorithm.RSA_2048 // KeyAlgorithm KeyAlgorithm `field:"optional" json:"keyAlgorithm" yaml:"keyAlgorithm"` // Alternative domain names on your certificate. // // Use this to register alternative domain names that represent the same site. // Default: - No additional FQDNs will be included as alternative domain names. // SubjectAlternativeNames *[]*string `field:"optional" json:"subjectAlternativeNames" yaml:"subjectAlternativeNames"` // Enable or disable transparency logging for this certificate. // // Once a certificate has been logged, it cannot be removed from the log. // Opting out at that point will have no effect. If you opt out of logging // when you request a certificate and then choose later to opt back in, // your certificate will not be logged until it is renewed. // If you want the certificate to be logged immediately, we recommend that you issue a new one. // See: https://docs.aws.amazon.com/acm/latest/userguide/acm-bestpractices.html#best-practices-transparency // // Default: true. // TransparencyLoggingEnabled *bool `field:"optional" json:"transparencyLoggingEnabled" yaml:"transparencyLoggingEnabled"` // How to validate this certificate. // Default: CertificateValidation.fromEmail() // Validation CertificateValidation `field:"optional" json:"validation" yaml:"validation"` }
Properties for your certificate.
Example:
exampleCom := route53.NewHostedZone(this, jsii.String("ExampleCom"), &HostedZoneProps{ ZoneName: jsii.String("example.com"), }) exampleNet := route53.NewHostedZone(this, jsii.String("ExampleNet"), &HostedZoneProps{ ZoneName: jsii.String("example.net"), }) cert := acm.NewCertificate(this, jsii.String("Certificate"), &CertificateProps{ DomainName: jsii.String("test.example.com"), SubjectAlternativeNames: []*string{ jsii.String("cool.example.com"), jsii.String("test.example.net"), }, Validation: acm.CertificateValidation_FromDnsMultiZone(map[string]iHostedZone{ "test.example.com": exampleCom, "cool.example.com": exampleCom, "test.example.net": exampleNet, }), })
type CertificateValidation ¶
type CertificateValidation interface { // The validation method. Method() ValidationMethod // Certification validation properties. Props() *CertificationValidationProps }
How to validate a certificate.
Example:
exampleCom := route53.NewHostedZone(this, jsii.String("ExampleCom"), &HostedZoneProps{ ZoneName: jsii.String("example.com"), }) exampleNet := route53.NewHostedZone(this, jsii.String("ExampleNet"), &HostedZoneProps{ ZoneName: jsii.String("example.net"), }) cert := acm.NewCertificate(this, jsii.String("Certificate"), &CertificateProps{ DomainName: jsii.String("test.example.com"), SubjectAlternativeNames: []*string{ jsii.String("cool.example.com"), jsii.String("test.example.net"), }, Validation: acm.CertificateValidation_FromDnsMultiZone(map[string]iHostedZone{ "test.example.com": exampleCom, "cool.example.com": exampleCom, "test.example.net": exampleNet, }), })
func CertificateValidation_FromDns ¶
func CertificateValidation_FromDns(hostedZone awsroute53.IHostedZone) CertificateValidation
Validate the certificate with DNS.
IMPORTANT: If `hostedZone` is not specified, DNS records must be added manually and the stack will not complete creating until the records are added.
func CertificateValidation_FromDnsMultiZone ¶
func CertificateValidation_FromDnsMultiZone(hostedZones *map[string]awsroute53.IHostedZone) CertificateValidation
Validate the certificate with automatically created DNS records in multiple Amazon Route 53 hosted zones.
func CertificateValidation_FromEmail ¶
func CertificateValidation_FromEmail(validationDomains *map[string]*string) CertificateValidation
Validate the certificate with Email.
IMPORTANT: if you are creating a certificate as part of your stack, the stack will not complete creating until you read and follow the instructions in the email that you will receive.
ACM will send validation emails to the following addresses:
admin@domain.com administrator@domain.com hostmaster@domain.com postmaster@domain.com webmaster@domain.com
For every domain that you register.
type CertificationValidationProps ¶
type CertificationValidationProps struct { // Hosted zone to use for DNS validation. // Default: - use email validation. // HostedZone awsroute53.IHostedZone `field:"optional" json:"hostedZone" yaml:"hostedZone"` // A map of hosted zones to use for DNS validation. // Default: - use `hostedZone`. // HostedZones *map[string]awsroute53.IHostedZone `field:"optional" json:"hostedZones" yaml:"hostedZones"` // Validation method. // Default: ValidationMethod.EMAIL // Method ValidationMethod `field:"optional" json:"method" yaml:"method"` // Validation domains to use for email validation. // Default: - Apex domain. // ValidationDomains *map[string]*string `field:"optional" json:"validationDomains" yaml:"validationDomains"` }
Properties for certificate validation.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var hostedZone hostedZone certificationValidationProps := &CertificationValidationProps{ HostedZone: hostedZone, HostedZones: map[string]iHostedZone{ "hostedZonesKey": hostedZone, }, Method: awscdk.Aws_certificatemanager.ValidationMethod_EMAIL, ValidationDomains: map[string]*string{ "validationDomainsKey": jsii.String("validationDomains"), }, }
type CfnAccount ¶
type CfnAccount interface { awscdk.CfnResource awscdk.IInspectable // ID of the AWS account that owns the certificate. AttrAccountId() *string // Options for this resource, such as condition, update policy etc. CfnOptions() awscdk.ICfnResourceOptions CfnProperties() *map[string]interface{} // AWS resource type. CfnResourceType() *string // Returns: the stack trace of the point where this Resource was created from, sourced // from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most // node +internal+ entries filtered. CreationStack() *[]*string // Object containing expiration events options associated with an AWS account . ExpiryEventsConfiguration() interface{} SetExpiryEventsConfiguration(val interface{}) // The logical ID for this CloudFormation stack element. // // The logical ID of the element // is calculated from the path of the resource node in the construct tree. // // To override this value, use `overrideLogicalId(newLogicalId)`. // // Returns: the logical ID as a stringified token. This value will only get // resolved during synthesis. LogicalId() *string // The tree node. Node() constructs.Node // Return a string that will be resolved to a CloudFormation `{ Ref }` for this element. // // If, by any chance, the intrinsic reference of a resource is not a string, you could // coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`. Ref() *string // The stack in which this element is defined. // // CfnElements must be defined within a stack scope (directly or indirectly). Stack() awscdk.Stack // Deprecated. // Deprecated: use `updatedProperties` // // Return properties modified after initiation // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. UpdatedProperites() *map[string]interface{} // Return properties modified after initiation. // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. UpdatedProperties() *map[string]interface{} // Syntactic sugar for `addOverride(path, undefined)`. AddDeletionOverride(path *string) // Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. // // This can be used for resources across stacks (or nested stack) boundaries // and the dependency will automatically be transferred to the relevant scope. AddDependency(target awscdk.CfnResource) // Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. // Deprecated: use addDependency. AddDependsOn(target awscdk.CfnResource) // Add a value to the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // Note that this is a different set of metadata from CDK node metadata; this // metadata ends up in the stack template under the resource, whereas CDK // node metadata ends up in the Cloud Assembly. // AddMetadata(key *string, value interface{}) // Adds an override to the synthesized CloudFormation resource. // // To add a // property override, either use `addPropertyOverride` or prefix `path` with // "Properties." (i.e. `Properties.TopicName`). // // If the override is nested, separate each nested level using a dot (.) in the path parameter. // If there is an array as part of the nesting, specify the index in the path. // // To include a literal `.` in the property name, prefix with a `\`. In most // programming languages you will need to write this as `"\\."` because the // `\` itself will need to be escaped. // // For example, // “`typescript // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']); // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE'); // “` // would add the overrides // “`json // "Properties": { // "GlobalSecondaryIndexes": [ // { // "Projection": { // "NonKeyAttributes": [ "myattribute" ] // ... // } // ... // }, // { // "ProjectionType": "INCLUDE" // ... // }, // ] // ... // } // “` // // The `value` argument to `addOverride` will not be processed or translated // in any way. Pass raw JSON values in here with the correct capitalization // for CloudFormation. If you pass CDK classes or structs, they will be // rendered with lowercased key names, and CloudFormation will reject the // template. AddOverride(path *string, value interface{}) // Adds an override that deletes the value of a property from the resource definition. AddPropertyDeletionOverride(propertyPath *string) // Adds an override to a resource property. // // Syntactic sugar for `addOverride("Properties.<...>", value)`. AddPropertyOverride(propertyPath *string, value interface{}) // Sets the deletion policy of the resource based on the removal policy specified. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). In some // cases, a snapshot can be taken of the resource prior to deletion // (`RemovalPolicy.SNAPSHOT`). A list of resources that support this policy // can be found in the following link:. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options // ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions) // Returns a token for an runtime attribute of this resource. // // Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility // in case there is no generated attribute. GetAtt(attributeName *string, typeHint awscdk.ResolutionTypeHint) awscdk.Reference // Retrieve a value value from the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // Note that this is a different set of metadata from CDK node metadata; this // metadata ends up in the stack template under the resource, whereas CDK // node metadata ends up in the Cloud Assembly. // GetMetadata(key *string) interface{} // Examines the CloudFormation resource and discloses attributes. Inspect(inspector awscdk.TreeInspector) // Retrieves an array of resources this resource depends on. // // This assembles dependencies on resources across stacks (including nested stacks) // automatically. ObtainDependencies() *[]interface{} // Get a shallow copy of dependencies between this resource and other resources in the same stack. ObtainResourceDependencies() *[]awscdk.CfnResource // Overrides the auto-generated logical ID with a specific ID. OverrideLogicalId(newLogicalId *string) // Indicates that this resource no longer depends on another resource. // // This can be used for resources across stacks (including nested stacks) // and the dependency will automatically be removed from the relevant scope. RemoveDependency(target awscdk.CfnResource) RenderProperties(props *map[string]interface{}) *map[string]interface{} // Replaces one dependency with another. ReplaceDependency(target awscdk.CfnResource, newTarget awscdk.CfnResource) // Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template. // // Returns: `true` if the resource should be included or `false` is the resource // should be omitted. ShouldSynthesize() *bool // Returns a string representation of this construct. // // Returns: a string representation of this resource. ToString() *string ValidateProperties(_properties interface{}) }
The `AWS::CertificateManager::Account` resource defines the expiry event configuration that determines the number of days prior to expiry when ACM starts generating EventBridge events.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" cfnAccount := awscdk.Aws_certificatemanager.NewCfnAccount(this, jsii.String("MyCfnAccount"), &CfnAccountProps{ ExpiryEventsConfiguration: &ExpiryEventsConfigurationProperty{ DaysBeforeExpiry: jsii.Number(123), }, })
func NewCfnAccount ¶
func NewCfnAccount(scope constructs.Construct, id *string, props *CfnAccountProps) CfnAccount
type CfnAccountProps ¶
type CfnAccountProps struct { // Object containing expiration events options associated with an AWS account . // // For more information, see [ExpiryEventsConfiguration](https://docs.aws.amazon.com/acm/latest/APIReference/API_ExpiryEventsConfiguration.html) in the API reference. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-certificatemanager-account.html#cfn-certificatemanager-account-expiryeventsconfiguration // ExpiryEventsConfiguration interface{} `field:"required" json:"expiryEventsConfiguration" yaml:"expiryEventsConfiguration"` }
Properties for defining a `CfnAccount`.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" cfnAccountProps := &CfnAccountProps{ ExpiryEventsConfiguration: &ExpiryEventsConfigurationProperty{ DaysBeforeExpiry: jsii.Number(123), }, }
type CfnAccount_ExpiryEventsConfigurationProperty ¶
type CfnAccount_ExpiryEventsConfigurationProperty struct { // This option specifies the number of days prior to certificate expiration when ACM starts generating `EventBridge` events. // // ACM sends one event per day per certificate until the certificate expires. By default, accounts receive events starting 45 days before certificate expiration. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-certificatemanager-account-expiryeventsconfiguration.html#cfn-certificatemanager-account-expiryeventsconfiguration-daysbeforeexpiry // DaysBeforeExpiry *float64 `field:"optional" json:"daysBeforeExpiry" yaml:"daysBeforeExpiry"` }
Object containing expiration events options associated with an AWS account .
For more information, see [ExpiryEventsConfiguration](https://docs.aws.amazon.com/acm/latest/APIReference/API_ExpiryEventsConfiguration.html) in the API reference.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" expiryEventsConfigurationProperty := &ExpiryEventsConfigurationProperty{ DaysBeforeExpiry: jsii.Number(123), }
type CfnCertificate ¶
type CfnCertificate interface { awscdk.CfnResource awscdk.IInspectable awscdk.ITaggable AttrId() *string // The Amazon Resource Name (ARN) of the private certificate authority (CA) that will be used to issue the certificate. CertificateAuthorityArn() *string SetCertificateAuthorityArn(val *string) // You can opt out of certificate transparency logging by specifying the `DISABLED` option. // // Opt in by specifying `ENABLED` . CertificateTransparencyLoggingPreference() *string SetCertificateTransparencyLoggingPreference(val *string) // Options for this resource, such as condition, update policy etc. CfnOptions() awscdk.ICfnResourceOptions CfnProperties() *map[string]interface{} // AWS resource type. CfnResourceType() *string // Returns: the stack trace of the point where this Resource was created from, sourced // from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most // node +internal+ entries filtered. CreationStack() *[]*string // The fully qualified domain name (FQDN), such as www.example.com, with which you want to secure an ACM certificate. Use an asterisk (*) to create a wildcard certificate that protects several sites in the same domain. For example, `*.example.com` protects `www.example.com` , `site.example.com` , and `images.example.com.`. DomainName() *string SetDomainName(val *string) // Domain information that domain name registrars use to verify your identity. DomainValidationOptions() interface{} SetDomainValidationOptions(val interface{}) // Specifies the algorithm of the public and private key pair that your certificate uses to encrypt data. KeyAlgorithm() *string SetKeyAlgorithm(val *string) // The logical ID for this CloudFormation stack element. // // The logical ID of the element // is calculated from the path of the resource node in the construct tree. // // To override this value, use `overrideLogicalId(newLogicalId)`. // // Returns: the logical ID as a stringified token. This value will only get // resolved during synthesis. LogicalId() *string // The tree node. Node() constructs.Node // Return a string that will be resolved to a CloudFormation `{ Ref }` for this element. // // If, by any chance, the intrinsic reference of a resource is not a string, you could // coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`. Ref() *string // The stack in which this element is defined. // // CfnElements must be defined within a stack scope (directly or indirectly). Stack() awscdk.Stack // Additional FQDNs to be included in the Subject Alternative Name extension of the ACM certificate. SubjectAlternativeNames() *[]*string SetSubjectAlternativeNames(val *[]*string) // Tag Manager which manages the tags for this resource. Tags() awscdk.TagManager // Key-value pairs that can identify the certificate. TagsRaw() *[]*awscdk.CfnTag SetTagsRaw(val *[]*awscdk.CfnTag) // Deprecated. // Deprecated: use `updatedProperties` // // Return properties modified after initiation // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. UpdatedProperites() *map[string]interface{} // Return properties modified after initiation. // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. UpdatedProperties() *map[string]interface{} // The method you want to use to validate that you own or control the domain associated with a public certificate. ValidationMethod() *string SetValidationMethod(val *string) // Syntactic sugar for `addOverride(path, undefined)`. AddDeletionOverride(path *string) // Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. // // This can be used for resources across stacks (or nested stack) boundaries // and the dependency will automatically be transferred to the relevant scope. AddDependency(target awscdk.CfnResource) // Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. // Deprecated: use addDependency. AddDependsOn(target awscdk.CfnResource) // Add a value to the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // Note that this is a different set of metadata from CDK node metadata; this // metadata ends up in the stack template under the resource, whereas CDK // node metadata ends up in the Cloud Assembly. // AddMetadata(key *string, value interface{}) // Adds an override to the synthesized CloudFormation resource. // // To add a // property override, either use `addPropertyOverride` or prefix `path` with // "Properties." (i.e. `Properties.TopicName`). // // If the override is nested, separate each nested level using a dot (.) in the path parameter. // If there is an array as part of the nesting, specify the index in the path. // // To include a literal `.` in the property name, prefix with a `\`. In most // programming languages you will need to write this as `"\\."` because the // `\` itself will need to be escaped. // // For example, // “`typescript // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']); // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE'); // “` // would add the overrides // “`json // "Properties": { // "GlobalSecondaryIndexes": [ // { // "Projection": { // "NonKeyAttributes": [ "myattribute" ] // ... // } // ... // }, // { // "ProjectionType": "INCLUDE" // ... // }, // ] // ... // } // “` // // The `value` argument to `addOverride` will not be processed or translated // in any way. Pass raw JSON values in here with the correct capitalization // for CloudFormation. If you pass CDK classes or structs, they will be // rendered with lowercased key names, and CloudFormation will reject the // template. AddOverride(path *string, value interface{}) // Adds an override that deletes the value of a property from the resource definition. AddPropertyDeletionOverride(propertyPath *string) // Adds an override to a resource property. // // Syntactic sugar for `addOverride("Properties.<...>", value)`. AddPropertyOverride(propertyPath *string, value interface{}) // Sets the deletion policy of the resource based on the removal policy specified. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). In some // cases, a snapshot can be taken of the resource prior to deletion // (`RemovalPolicy.SNAPSHOT`). A list of resources that support this policy // can be found in the following link:. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options // ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions) // Returns a token for an runtime attribute of this resource. // // Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility // in case there is no generated attribute. GetAtt(attributeName *string, typeHint awscdk.ResolutionTypeHint) awscdk.Reference // Retrieve a value value from the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // Note that this is a different set of metadata from CDK node metadata; this // metadata ends up in the stack template under the resource, whereas CDK // node metadata ends up in the Cloud Assembly. // GetMetadata(key *string) interface{} // Examines the CloudFormation resource and discloses attributes. Inspect(inspector awscdk.TreeInspector) // Retrieves an array of resources this resource depends on. // // This assembles dependencies on resources across stacks (including nested stacks) // automatically. ObtainDependencies() *[]interface{} // Get a shallow copy of dependencies between this resource and other resources in the same stack. ObtainResourceDependencies() *[]awscdk.CfnResource // Overrides the auto-generated logical ID with a specific ID. OverrideLogicalId(newLogicalId *string) // Indicates that this resource no longer depends on another resource. // // This can be used for resources across stacks (including nested stacks) // and the dependency will automatically be removed from the relevant scope. RemoveDependency(target awscdk.CfnResource) RenderProperties(props *map[string]interface{}) *map[string]interface{} // Replaces one dependency with another. ReplaceDependency(target awscdk.CfnResource, newTarget awscdk.CfnResource) // Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template. // // Returns: `true` if the resource should be included or `false` is the resource // should be omitted. ShouldSynthesize() *bool // Returns a string representation of this construct. // // Returns: a string representation of this resource. ToString() *string ValidateProperties(_properties interface{}) }
The `AWS::CertificateManager::Certificate` resource requests an AWS Certificate Manager ( ACM ) certificate that you can use to enable secure connections.
For example, you can deploy an ACM certificate to an Elastic Load Balancer to enable HTTPS support. For more information, see [RequestCertificate](https://docs.aws.amazon.com/acm/latest/APIReference/API_RequestCertificate.html) in the AWS Certificate Manager API Reference.
> When you use the `AWS::CertificateManager::Certificate` resource in a CloudFormation stack, domain validation is handled automatically if all three of the following are true: The certificate domain is hosted in Amazon Route 53, the domain resides in your AWS account , and you are using DNS validation. > > However, if the certificate uses email validation, or if the domain is not hosted in Route 53, then the stack will remain in the `CREATE_IN_PROGRESS` state. Further stack operations are delayed until you validate the certificate request, either by acting upon the instructions in the validation email, or by adding a CNAME record to your DNS configuration. For more information, see [Option 1: DNS Validation](https://docs.aws.amazon.com/acm/latest/userguide/dns-validation.html) and [Option 2: Email Validation](https://docs.aws.amazon.com/acm/latest/userguide/email-validation.html) .
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" cfnCertificate := awscdk.Aws_certificatemanager.NewCfnCertificate(this, jsii.String("MyCfnCertificate"), &CfnCertificateProps{ DomainName: jsii.String("domainName"), // the properties below are optional CertificateAuthorityArn: jsii.String("certificateAuthorityArn"), CertificateTransparencyLoggingPreference: jsii.String("certificateTransparencyLoggingPreference"), DomainValidationOptions: []interface{}{ &DomainValidationOptionProperty{ DomainName: jsii.String("domainName"), // the properties below are optional HostedZoneId: jsii.String("hostedZoneId"), ValidationDomain: jsii.String("validationDomain"), }, }, KeyAlgorithm: jsii.String("keyAlgorithm"), SubjectAlternativeNames: []*string{ jsii.String("subjectAlternativeNames"), }, Tags: []cfnTag{ &cfnTag{ Key: jsii.String("key"), Value: jsii.String("value"), }, }, ValidationMethod: jsii.String("validationMethod"), })
func NewCfnCertificate ¶
func NewCfnCertificate(scope constructs.Construct, id *string, props *CfnCertificateProps) CfnCertificate
type CfnCertificateProps ¶
type CfnCertificateProps struct { // The fully qualified domain name (FQDN), such as www.example.com, with which you want to secure an ACM certificate. Use an asterisk (*) to create a wildcard certificate that protects several sites in the same domain. For example, `*.example.com` protects `www.example.com` , `site.example.com` , and `images.example.com.`. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-certificatemanager-certificate.html#cfn-certificatemanager-certificate-domainname // DomainName *string `field:"required" json:"domainName" yaml:"domainName"` // The Amazon Resource Name (ARN) of the private certificate authority (CA) that will be used to issue the certificate. // // If you do not provide an ARN and you are trying to request a private certificate, ACM will attempt to issue a public certificate. For more information about private CAs, see the [AWS Private Certificate Authority](https://docs.aws.amazon.com/privateca/latest/userguide/PcaWelcome.html) user guide. The ARN must have the following form: // // `arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012`. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-certificatemanager-certificate.html#cfn-certificatemanager-certificate-certificateauthorityarn // CertificateAuthorityArn *string `field:"optional" json:"certificateAuthorityArn" yaml:"certificateAuthorityArn"` // You can opt out of certificate transparency logging by specifying the `DISABLED` option. Opt in by specifying `ENABLED` . // // If you do not specify a certificate transparency logging preference on a new CloudFormation template, or if you remove the logging preference from an existing template, this is the same as explicitly enabling the preference. // // Changing the certificate transparency logging preference will update the existing resource by calling `UpdateCertificateOptions` on the certificate. This action will not create a new resource. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-certificatemanager-certificate.html#cfn-certificatemanager-certificate-certificatetransparencyloggingpreference // CertificateTransparencyLoggingPreference *string `field:"optional" json:"certificateTransparencyLoggingPreference" yaml:"certificateTransparencyLoggingPreference"` // Domain information that domain name registrars use to verify your identity. // // > In order for a AWS::CertificateManager::Certificate to be provisioned and validated in CloudFormation automatically, the `DomainName` property needs to be identical to one of the `DomainName` property supplied in DomainValidationOptions, if the ValidationMethod is **DNS**. Failing to keep them like-for-like will result in failure to create the domain validation records in Route53. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-certificatemanager-certificate.html#cfn-certificatemanager-certificate-domainvalidationoptions // DomainValidationOptions interface{} `field:"optional" json:"domainValidationOptions" yaml:"domainValidationOptions"` // Specifies the algorithm of the public and private key pair that your certificate uses to encrypt data. // // RSA is the default key algorithm for ACM certificates. Elliptic Curve Digital Signature Algorithm (ECDSA) keys are smaller, offering security comparable to RSA keys but with greater computing efficiency. However, ECDSA is not supported by all network clients. Some AWS services may require RSA keys, or only support ECDSA keys of a particular size, while others allow the use of either RSA and ECDSA keys to ensure that compatibility is not broken. Check the requirements for the AWS service where you plan to deploy your certificate. For more information about selecting an algorithm, see [Key algorithms](https://docs.aws.amazon.com/acm/latest/userguide/acm-certificate.html#algorithms) . // // > Algorithms supported for an ACM certificate request include: // > // > - `RSA_2048` // > - `EC_prime256v1` // > - `EC_secp384r1` // > // > Other listed algorithms are for imported certificates only. > When you request a private PKI certificate signed by a CA from AWS Private CA, the specified signing algorithm family (RSA or ECDSA) must match the algorithm family of the CA's secret key. // // Default: RSA_2048. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-certificatemanager-certificate.html#cfn-certificatemanager-certificate-keyalgorithm // KeyAlgorithm *string `field:"optional" json:"keyAlgorithm" yaml:"keyAlgorithm"` // Additional FQDNs to be included in the Subject Alternative Name extension of the ACM certificate. // // For example, you can add www.example.net to a certificate for which the `DomainName` field is www.example.com if users can reach your site by using either name. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-certificatemanager-certificate.html#cfn-certificatemanager-certificate-subjectalternativenames // SubjectAlternativeNames *[]*string `field:"optional" json:"subjectAlternativeNames" yaml:"subjectAlternativeNames"` // Key-value pairs that can identify the certificate. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-certificatemanager-certificate.html#cfn-certificatemanager-certificate-tags // Tags *[]*awscdk.CfnTag `field:"optional" json:"tags" yaml:"tags"` // The method you want to use to validate that you own or control the domain associated with a public certificate. // // You can [validate with DNS](https://docs.aws.amazon.com/acm/latest/userguide/gs-acm-validate-dns.html) or [validate with email](https://docs.aws.amazon.com/acm/latest/userguide/gs-acm-validate-email.html) . We recommend that you use DNS validation. // // If not specified, this property defaults to email validation. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-certificatemanager-certificate.html#cfn-certificatemanager-certificate-validationmethod // ValidationMethod *string `field:"optional" json:"validationMethod" yaml:"validationMethod"` }
Properties for defining a `CfnCertificate`.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" cfnCertificateProps := &CfnCertificateProps{ DomainName: jsii.String("domainName"), // the properties below are optional CertificateAuthorityArn: jsii.String("certificateAuthorityArn"), CertificateTransparencyLoggingPreference: jsii.String("certificateTransparencyLoggingPreference"), DomainValidationOptions: []interface{}{ &DomainValidationOptionProperty{ DomainName: jsii.String("domainName"), // the properties below are optional HostedZoneId: jsii.String("hostedZoneId"), ValidationDomain: jsii.String("validationDomain"), }, }, KeyAlgorithm: jsii.String("keyAlgorithm"), SubjectAlternativeNames: []*string{ jsii.String("subjectAlternativeNames"), }, Tags: []cfnTag{ &cfnTag{ Key: jsii.String("key"), Value: jsii.String("value"), }, }, ValidationMethod: jsii.String("validationMethod"), }
type CfnCertificate_DomainValidationOptionProperty ¶
type CfnCertificate_DomainValidationOptionProperty struct { // A fully qualified domain name (FQDN) in the certificate request. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-certificatemanager-certificate-domainvalidationoption.html#cfn-certificatemanager-certificate-domainvalidationoption-domainname // DomainName *string `field:"required" json:"domainName" yaml:"domainName"` // The `HostedZoneId` option, which is available if you are using Route 53 as your domain registrar, causes ACM to add your CNAME to the domain record. // // Your list of `DomainValidationOptions` must contain one and only one of the domain-validation options, and the `HostedZoneId` can be used only when `DNS` is specified as your validation method. // // Use the Route 53 `ListHostedZones` API to discover IDs for available hosted zones. // // This option is required for publicly trusted certificates. // // > The `ListHostedZones` API returns IDs in the format "/hostedzone/Z111111QQQQQQQ", but CloudFormation requires the IDs to be in the format "Z111111QQQQQQQ". // // When you change your `DomainValidationOptions` , a new resource is created. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-certificatemanager-certificate-domainvalidationoption.html#cfn-certificatemanager-certificate-domainvalidationoption-hostedzoneid // HostedZoneId *string `field:"optional" json:"hostedZoneId" yaml:"hostedZoneId"` // The domain name to which you want ACM to send validation emails. // // This domain name is the suffix of the email addresses that you want ACM to use. This must be the same as the `DomainName` value or a superdomain of the `DomainName` value. For example, if you request a certificate for `testing.example.com` , you can specify `example.com` as this value. In that case, ACM sends domain validation emails to the following five addresses: // // - admin@example.com // - administrator@example.com // - hostmaster@example.com // - postmaster@example.com // - webmaster@example.com // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-certificatemanager-certificate-domainvalidationoption.html#cfn-certificatemanager-certificate-domainvalidationoption-validationdomain // ValidationDomain *string `field:"optional" json:"validationDomain" yaml:"validationDomain"` }
`DomainValidationOption` is a property of the [AWS::CertificateManager::Certificate](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-certificatemanager-certificate.html) resource that specifies the AWS Certificate Manager ( ACM ) certificate domain to validate. Depending on the chosen validation method, ACM checks the domain's DNS record for a validation CNAME, or it attempts to send a validation email message to the domain owner.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" domainValidationOptionProperty := &DomainValidationOptionProperty{ DomainName: jsii.String("domainName"), // the properties below are optional HostedZoneId: jsii.String("hostedZoneId"), ValidationDomain: jsii.String("validationDomain"), }
type DnsValidatedCertificate
deprecated
type DnsValidatedCertificate interface { awscdk.Resource ICertificate awscdk.ITaggable // The certificate's ARN. // Deprecated: use {@link Certificate } instead. CertificateArn() *string // The environment this resource belongs to. // // For resources that are created and managed by the CDK // (generally, those created by creating new class instances like Role, Bucket, etc.), // this is always the same as the environment of the stack they belong to; // however, for imported resources // (those obtained from static methods like fromRoleArn, fromBucketName, etc.), // that might be different than the stack they were imported into. // Deprecated: use {@link Certificate } instead. Env() *awscdk.ResourceEnvironment // The tree node. // Deprecated: use {@link Certificate } instead. Node() constructs.Node // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. // Deprecated: use {@link Certificate } instead. PhysicalName() *string // If the certificate is provisionned in a different region than the containing stack, this should be the region in which the certificate lives so we can correctly create `Metric` instances. // Deprecated: use {@link Certificate } instead. Region() *string // The stack in which this resource is defined. // Deprecated: use {@link Certificate } instead. Stack() awscdk.Stack // Resource Tags. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-certificatemanager-certificate.html#cfn-certificatemanager-certificate-tags // // Deprecated: use {@link Certificate } instead. Tags() awscdk.TagManager // Apply the given removal policy to this resource. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). // Deprecated: use {@link Certificate } instead. ApplyRemovalPolicy(policy awscdk.RemovalPolicy) // Deprecated: use {@link Certificate } instead. GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. // Deprecated: use {@link Certificate } instead. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. // Deprecated: use {@link Certificate } instead. GetResourceNameAttribute(nameAttr *string) *string // Return the DaysToExpiry metric for this AWS Certificate Manager Certificate. By default, this is the minimum value over 1 day. // // This metric is no longer emitted once the certificate has effectively // expired, so alarms configured on this metric should probably treat missing // data as "breaching". // Deprecated: use {@link Certificate } instead. MetricDaysToExpiry(props *awscloudwatch.MetricOptions) awscloudwatch.Metric // Returns a string representation of this construct. // Deprecated: use {@link Certificate } instead. ToString() *string }
A certificate managed by AWS Certificate Manager.
Will be automatically validated using DNS validation against the specified Route 53 hosted zone.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var certificateValidation certificateValidation var hostedZone hostedZone var keyAlgorithm keyAlgorithm var role role dnsValidatedCertificate := awscdk.Aws_certificatemanager.NewDnsValidatedCertificate(this, jsii.String("MyDnsValidatedCertificate"), &DnsValidatedCertificateProps{ DomainName: jsii.String("domainName"), HostedZone: hostedZone, // the properties below are optional CertificateName: jsii.String("certificateName"), CleanupRoute53Records: jsii.Boolean(false), CustomResourceRole: role, KeyAlgorithm: keyAlgorithm, Region: jsii.String("region"), Route53Endpoint: jsii.String("route53Endpoint"), SubjectAlternativeNames: []*string{ jsii.String("subjectAlternativeNames"), }, TransparencyLoggingEnabled: jsii.Boolean(false), Validation: certificateValidation, })
Deprecated: use {@link Certificate } instead.
func NewDnsValidatedCertificate
deprecated
func NewDnsValidatedCertificate(scope constructs.Construct, id *string, props *DnsValidatedCertificateProps) DnsValidatedCertificate
Deprecated: use {@link Certificate } instead.
type DnsValidatedCertificateProps ¶
type DnsValidatedCertificateProps struct { // Fully-qualified domain name to request a certificate for. // // May contain wildcards, such as “*.domain.com“. DomainName *string `field:"required" json:"domainName" yaml:"domainName"` // The Certificate name. // // Since the Certificate resource doesn't support providing a physical name, the value provided here will be recorded in the `Name` tag. // Default: the full, absolute path of this construct. // CertificateName *string `field:"optional" json:"certificateName" yaml:"certificateName"` // Specifies the algorithm of the public and private key pair that your certificate uses to encrypt data. // See: https://docs.aws.amazon.com/acm/latest/userguide/acm-certificate.html#algorithms.title // // Default: KeyAlgorithm.RSA_2048 // KeyAlgorithm KeyAlgorithm `field:"optional" json:"keyAlgorithm" yaml:"keyAlgorithm"` // Alternative domain names on your certificate. // // Use this to register alternative domain names that represent the same site. // Default: - No additional FQDNs will be included as alternative domain names. // SubjectAlternativeNames *[]*string `field:"optional" json:"subjectAlternativeNames" yaml:"subjectAlternativeNames"` // Enable or disable transparency logging for this certificate. // // Once a certificate has been logged, it cannot be removed from the log. // Opting out at that point will have no effect. If you opt out of logging // when you request a certificate and then choose later to opt back in, // your certificate will not be logged until it is renewed. // If you want the certificate to be logged immediately, we recommend that you issue a new one. // See: https://docs.aws.amazon.com/acm/latest/userguide/acm-bestpractices.html#best-practices-transparency // // Default: true. // TransparencyLoggingEnabled *bool `field:"optional" json:"transparencyLoggingEnabled" yaml:"transparencyLoggingEnabled"` // How to validate this certificate. // Default: CertificateValidation.fromEmail() // Validation CertificateValidation `field:"optional" json:"validation" yaml:"validation"` // Route 53 Hosted Zone used to perform DNS validation of the request. // // The zone // must be authoritative for the domain name specified in the Certificate Request. HostedZone awsroute53.IHostedZone `field:"required" json:"hostedZone" yaml:"hostedZone"` // When set to true, when the DnsValidatedCertificate is deleted, the associated Route53 validation records are removed. // // CAUTION: If multiple certificates share the same domains (and same validation records), // this can cause the other certificates to fail renewal and/or not validate. // Not recommended for production use. // Default: false. // CleanupRoute53Records *bool `field:"optional" json:"cleanupRoute53Records" yaml:"cleanupRoute53Records"` // Role to use for the custom resource that creates the validated certificate. // Default: - A new role will be created. // CustomResourceRole awsiam.IRole `field:"optional" json:"customResourceRole" yaml:"customResourceRole"` // AWS region that will host the certificate. // // This is needed especially // for certificates used for CloudFront distributions, which require the region // to be us-east-1. // Default: the region the stack is deployed in. // Region *string `field:"optional" json:"region" yaml:"region"` // An endpoint of Route53 service, which is not necessary as AWS SDK could figure out the right endpoints for most regions, but for some regions such as those in aws-cn partition, the default endpoint is not working now, hence the right endpoint need to be specified through this prop. // // Route53 is not been officially launched in China, it is only available for AWS // internal accounts now. To make DnsValidatedCertificate work for internal accounts // now, a special endpoint needs to be provided. // Default: - The AWS SDK will determine the Route53 endpoint to use based on region. // Route53Endpoint *string `field:"optional" json:"route53Endpoint" yaml:"route53Endpoint"` }
Properties to create a DNS validated certificate managed by AWS Certificate Manager.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var certificateValidation certificateValidation var hostedZone hostedZone var keyAlgorithm keyAlgorithm var role role dnsValidatedCertificateProps := &DnsValidatedCertificateProps{ DomainName: jsii.String("domainName"), HostedZone: hostedZone, // the properties below are optional CertificateName: jsii.String("certificateName"), CleanupRoute53Records: jsii.Boolean(false), CustomResourceRole: role, KeyAlgorithm: keyAlgorithm, Region: jsii.String("region"), Route53Endpoint: jsii.String("route53Endpoint"), SubjectAlternativeNames: []*string{ jsii.String("subjectAlternativeNames"), }, TransparencyLoggingEnabled: jsii.Boolean(false), Validation: certificateValidation, }
type ICertificate ¶
type ICertificate interface { awscdk.IResource // Return the DaysToExpiry metric for this AWS Certificate Manager Certificate. By default, this is the minimum value over 1 day. // // This metric is no longer emitted once the certificate has effectively // expired, so alarms configured on this metric should probably treat missing // data as "breaching". MetricDaysToExpiry(props *awscloudwatch.MetricOptions) awscloudwatch.Metric // The certificate's ARN. CertificateArn() *string }
Represents a certificate in AWS Certificate Manager.
func Certificate_FromCertificateArn ¶
func Certificate_FromCertificateArn(scope constructs.Construct, id *string, certificateArn *string) ICertificate
Import a certificate.
func PrivateCertificate_FromCertificateArn ¶
func PrivateCertificate_FromCertificateArn(scope constructs.Construct, id *string, certificateArn *string) ICertificate
Import a certificate.
type KeyAlgorithm ¶ added in v2.119.0
type KeyAlgorithm interface { // The name of the algorithm. Name() *string }
Certificate Manager key algorithm.
If you need to use an algorithm that doesn't exist as a static member, you can instantiate a `KeyAlgorithm` object, e.g: `new KeyAlgorithm('RSA_2048')`.
Example:
import acmpca "github.com/aws/aws-cdk-go/awscdk" acm.NewPrivateCertificate(this, jsii.String("PrivateCertificate"), &PrivateCertificateProps{ DomainName: jsii.String("test.example.com"), SubjectAlternativeNames: []*string{ jsii.String("cool.example.com"), jsii.String("test.example.net"), }, // optional CertificateAuthority: acmpca.CertificateAuthority_FromCertificateAuthorityArn(this, jsii.String("CA"), jsii.String("arn:aws:acm-pca:us-east-1:123456789012:certificate-authority/023077d8-2bfa-4eb0-8f22-05c96deade77")), KeyAlgorithm: acm.KeyAlgorithm_RSA_2048(), })
func KeyAlgorithm_EC_PRIME256V1 ¶ added in v2.119.0
func KeyAlgorithm_EC_PRIME256V1() KeyAlgorithm
func KeyAlgorithm_EC_SECP384R1 ¶ added in v2.119.0
func KeyAlgorithm_EC_SECP384R1() KeyAlgorithm
func KeyAlgorithm_RSA_2048 ¶ added in v2.119.0
func KeyAlgorithm_RSA_2048() KeyAlgorithm
func NewKeyAlgorithm ¶ added in v2.119.0
func NewKeyAlgorithm(name *string) KeyAlgorithm
type PrivateCertificate ¶
type PrivateCertificate interface { awscdk.Resource ICertificate // The certificate's ARN. CertificateArn() *string // The environment this resource belongs to. // // For resources that are created and managed by the CDK // (generally, those created by creating new class instances like Role, Bucket, etc.), // this is always the same as the environment of the stack they belong to; // however, for imported resources // (those obtained from static methods like fromRoleArn, fromBucketName, etc.), // that might be different than the stack they were imported into. Env() *awscdk.ResourceEnvironment // The tree node. Node() constructs.Node // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. PhysicalName() *string // If the certificate is provisionned in a different region than the containing stack, this should be the region in which the certificate lives so we can correctly create `Metric` instances. Region() *string // The stack in which this resource is defined. Stack() awscdk.Stack // Apply the given removal policy to this resource. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). ApplyRemovalPolicy(policy awscdk.RemovalPolicy) GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. GetResourceNameAttribute(nameAttr *string) *string // Return the DaysToExpiry metric for this AWS Certificate Manager Certificate. By default, this is the minimum value over 1 day. // // This metric is no longer emitted once the certificate has effectively // expired, so alarms configured on this metric should probably treat missing // data as "breaching". MetricDaysToExpiry(props *awscloudwatch.MetricOptions) awscloudwatch.Metric // Returns a string representation of this construct. ToString() *string }
A private certificate managed by AWS Certificate Manager.
Example:
import acmpca "github.com/aws/aws-cdk-go/awscdk" acm.NewPrivateCertificate(this, jsii.String("PrivateCertificate"), &PrivateCertificateProps{ DomainName: jsii.String("test.example.com"), SubjectAlternativeNames: []*string{ jsii.String("cool.example.com"), jsii.String("test.example.net"), }, // optional CertificateAuthority: acmpca.CertificateAuthority_FromCertificateAuthorityArn(this, jsii.String("CA"), jsii.String("arn:aws:acm-pca:us-east-1:123456789012:certificate-authority/023077d8-2bfa-4eb0-8f22-05c96deade77")), KeyAlgorithm: acm.KeyAlgorithm_RSA_2048(), })
func NewPrivateCertificate ¶
func NewPrivateCertificate(scope constructs.Construct, id *string, props *PrivateCertificateProps) PrivateCertificate
type PrivateCertificateProps ¶
type PrivateCertificateProps struct { // Private certificate authority (CA) that will be used to issue the certificate. CertificateAuthority awsacmpca.ICertificateAuthority `field:"required" json:"certificateAuthority" yaml:"certificateAuthority"` // Fully-qualified domain name to request a private certificate for. // // May contain wildcards, such as “*.domain.com“. DomainName *string `field:"required" json:"domainName" yaml:"domainName"` // Specifies the algorithm of the public and private key pair that your certificate uses to encrypt data. // // When you request a private PKI certificate signed by a CA from AWS Private CA, the specified signing algorithm family // (RSA or ECDSA) must match the algorithm family of the CA's secret key. // See: https://docs.aws.amazon.com/acm/latest/userguide/acm-certificate.html#algorithms.title // // Default: KeyAlgorithm.RSA_2048 // KeyAlgorithm KeyAlgorithm `field:"optional" json:"keyAlgorithm" yaml:"keyAlgorithm"` // Alternative domain names on your private certificate. // // Use this to register alternative domain names that represent the same site. // Default: - No additional FQDNs will be included as alternative domain names. // SubjectAlternativeNames *[]*string `field:"optional" json:"subjectAlternativeNames" yaml:"subjectAlternativeNames"` }
Properties for your private certificate.
Example:
import acmpca "github.com/aws/aws-cdk-go/awscdk" acm.NewPrivateCertificate(this, jsii.String("PrivateCertificate"), &PrivateCertificateProps{ DomainName: jsii.String("test.example.com"), SubjectAlternativeNames: []*string{ jsii.String("cool.example.com"), jsii.String("test.example.net"), }, // optional CertificateAuthority: acmpca.CertificateAuthority_FromCertificateAuthorityArn(this, jsii.String("CA"), jsii.String("arn:aws:acm-pca:us-east-1:123456789012:certificate-authority/023077d8-2bfa-4eb0-8f22-05c96deade77")), KeyAlgorithm: acm.KeyAlgorithm_RSA_2048(), })
type ValidationMethod ¶
type ValidationMethod string
Method used to assert ownership of the domain.
const ( // Send email to a number of email addresses associated with the domain. // See: https://docs.aws.amazon.com/acm/latest/userguide/gs-acm-validate-email.html // ValidationMethod_EMAIL ValidationMethod = "EMAIL" // Validate ownership by adding appropriate DNS records. // See: https://docs.aws.amazon.com/acm/latest/userguide/gs-acm-validate-dns.html // ValidationMethod_DNS ValidationMethod = "DNS" )
Source Files ¶
- Certificate.go
- CertificateProps.go
- CertificateValidation.go
- CertificateValidation__checks.go
- Certificate__checks.go
- CertificationValidationProps.go
- CfnAccount.go
- CfnAccountProps.go
- CfnAccount_ExpiryEventsConfigurationProperty.go
- CfnAccount__checks.go
- CfnCertificate.go
- CfnCertificateProps.go
- CfnCertificate_DomainValidationOptionProperty.go
- CfnCertificate__checks.go
- DnsValidatedCertificate.go
- DnsValidatedCertificateProps.go
- DnsValidatedCertificate__checks.go
- ICertificate.go
- ICertificate__checks.go
- KeyAlgorithm.go
- KeyAlgorithm__checks.go
- PrivateCertificate.go
- PrivateCertificateProps.go
- PrivateCertificate__checks.go
- ValidationMethod.go
- main.go