Class DelegationSignerRecord


  • public class DelegationSignerRecord
    extends com.pulumi.resources.CustomResource
    Provides a resource to manage a [delegation signer record](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-configuring-dnssec-enable-signing.html#dns-configuring-dnssec-enable-signing-step-1) in the parent DNS zone for domains registered with Route53. ## Example Usage ### Basic Usage
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.AwsFunctions;
     import com.pulumi.aws.inputs.GetCallerIdentityArgs;
     import com.pulumi.aws.kms.Key;
     import com.pulumi.aws.kms.KeyArgs;
     import com.pulumi.aws.route53.Zone;
     import com.pulumi.aws.route53.ZoneArgs;
     import com.pulumi.aws.route53.KeySigningKey;
     import com.pulumi.aws.route53.KeySigningKeyArgs;
     import com.pulumi.aws.route53.HostedZoneDnsSec;
     import com.pulumi.aws.route53.HostedZoneDnsSecArgs;
     import com.pulumi.aws.route53domains.DelegationSignerRecord;
     import com.pulumi.aws.route53domains.DelegationSignerRecordArgs;
     import com.pulumi.aws.route53domains.inputs.DelegationSignerRecordSigningAttributesArgs;
     import static com.pulumi.codegen.internal.Serialization.*;
     import com.pulumi.resources.CustomResourceOptions;
     import java.util.ArrayList;
     import java.util.Arrays;
     import java.util.Map;
     import java.io.File;
     import java.nio.file.Files;
     import java.nio.file.Paths;
     
     public class App {
         public static void main(String[] args) {
             Pulumi.run(App::stack);
         }
     
         public static void stack(Context ctx) {
             final var current = AwsFunctions.getCallerIdentity(GetCallerIdentityArgs.builder()
                 .build());
     
             var example = new Key("example", KeyArgs.builder()
                 .customerMasterKeySpec("ECC_NIST_P256")
                 .deletionWindowInDays(7)
                 .keyUsage("SIGN_VERIFY")
                 .policy(serializeJson(
                     jsonObject(
                         jsonProperty("Statement", jsonArray(
                             jsonObject(
                                 jsonProperty("Action", jsonArray(
                                     "kms:DescribeKey", 
                                     "kms:GetPublicKey", 
                                     "kms:Sign"
                                 )),
                                 jsonProperty("Effect", "Allow"),
                                 jsonProperty("Principal", jsonObject(
                                     jsonProperty("Service", "dnssec-route53.amazonaws.com")
                                 )),
                                 jsonProperty("Sid", "Allow Route 53 DNSSEC Service"),
                                 jsonProperty("Resource", "*"),
                                 jsonProperty("Condition", jsonObject(
                                     jsonProperty("StringEquals", jsonObject(
                                         jsonProperty("aws:SourceAccount", current.accountId())
                                     )),
                                     jsonProperty("ArnLike", jsonObject(
                                         jsonProperty("aws:SourceArn", "arn:aws:route53:::hostedzone/*")
                                     ))
                                 ))
                             ), 
                             jsonObject(
                                 jsonProperty("Action", "kms:CreateGrant"),
                                 jsonProperty("Effect", "Allow"),
                                 jsonProperty("Principal", jsonObject(
                                     jsonProperty("Service", "dnssec-route53.amazonaws.com")
                                 )),
                                 jsonProperty("Sid", "Allow Route 53 DNSSEC Service to CreateGrant"),
                                 jsonProperty("Resource", "*"),
                                 jsonProperty("Condition", jsonObject(
                                     jsonProperty("Bool", jsonObject(
                                         jsonProperty("kms:GrantIsForAWSResource", "true")
                                     ))
                                 ))
                             ), 
                             jsonObject(
                                 jsonProperty("Action", "kms:*"),
                                 jsonProperty("Effect", "Allow"),
                                 jsonProperty("Principal", jsonObject(
                                     jsonProperty("AWS", String.format("arn:aws:iam::%s:root", current.accountId()))
                                 )),
                                 jsonProperty("Resource", "*"),
                                 jsonProperty("Sid", "Enable IAM User Permissions")
                             )
                         )),
                         jsonProperty("Version", "2012-10-17")
                     )))
                 .build());
     
             var exampleZone = new Zone("exampleZone", ZoneArgs.builder()
                 .name("example.com")
                 .build());
     
             var exampleKeySigningKey = new KeySigningKey("exampleKeySigningKey", KeySigningKeyArgs.builder()
                 .hostedZoneId(test.id())
                 .keyManagementServiceArn(testAwsKmsKey.arn())
                 .name("example")
                 .build());
     
             var exampleHostedZoneDnsSec = new HostedZoneDnsSec("exampleHostedZoneDnsSec", HostedZoneDnsSecArgs.builder()
                 .hostedZoneId(exampleKeySigningKey.hostedZoneId())
                 .build(), CustomResourceOptions.builder()
                     .dependsOn(exampleKeySigningKey)
                     .build());
     
             var exampleDelegationSignerRecord = new DelegationSignerRecord("exampleDelegationSignerRecord", DelegationSignerRecordArgs.builder()
                 .signingAttributes(DelegationSignerRecordSigningAttributesArgs.builder()
                     .algorithm(exampleKeySigningKey.signingAlgorithmType())
                     .flags(exampleKeySigningKey.flag())
                     .publicKey(exampleKeySigningKey.publicKey())
                     .build())
                 .domainName("example.com")
                 .build());
     
         }
     }
     
     
    ## Import Using `pulumi import`, import delegation signer records using the domain name, flags, algorithm, and public key separated by a comma (`,`). For example: ```sh $ pulumi import aws:route53domains/delegationSignerRecord:DelegationSignerRecord example example.com,257,13,M1jizbcdK5IBt7d4lRIiFTx+N06BJzaeScK215EOfa8efd2akkUWmxD5OhodZCIiRMvL5ZnStUP5UReIeUmBeA== ```
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.pulumi.resources.CustomResource

        com.pulumi.resources.CustomResource.CustomResourceInternal
      • Nested classes/interfaces inherited from class com.pulumi.resources.Resource

        com.pulumi.resources.Resource.LazyField<T extends java.lang.Object>, com.pulumi.resources.Resource.LazyFields, com.pulumi.resources.Resource.ResourceInternal
    • Field Summary

      • Fields inherited from class com.pulumi.resources.Resource

        childResources, remote
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.pulumi.core.Output<java.lang.String> dnssecKeyId()  
      com.pulumi.core.Output<java.lang.String> domainName()  
      static DelegationSignerRecord get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, DelegationSignerRecordState state, com.pulumi.resources.CustomResourceOptions options)
      Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
      com.pulumi.core.Output<DelegationSignerRecordSigningAttributes> signingAttributes()  
      com.pulumi.core.Output<java.util.Optional<DelegationSignerRecordTimeouts>> timeouts()  
      • Methods inherited from class com.pulumi.resources.CustomResource

        getId, id, idFuture
      • Methods inherited from class com.pulumi.resources.Resource

        getChildResources, getResourceName, getResourceType, getUrn, pulumiChildResources, pulumiResourceName, pulumiResourceType, urn
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DelegationSignerRecord

        public DelegationSignerRecord​(java.lang.String name)
        Parameters:
        name - The _unique_ name of the resulting resource.
      • DelegationSignerRecord

        public DelegationSignerRecord​(java.lang.String name,
                                      DelegationSignerRecordArgs args)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
      • DelegationSignerRecord

        public DelegationSignerRecord​(java.lang.String name,
                                      DelegationSignerRecordArgs args,
                                      @Nullable
                                      com.pulumi.resources.CustomResourceOptions options)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
        options - A bag of options that control this resource's behavior.
    • Method Detail

      • dnssecKeyId

        public com.pulumi.core.Output<java.lang.String> dnssecKeyId()
        Returns:
        An ID assigned to the created DS record.
      • domainName

        public com.pulumi.core.Output<java.lang.String> domainName()
        Returns:
        The name of the domain that will have its parent DNS zone updated with the Delegation Signer record.
      • signingAttributes

        public com.pulumi.core.Output<DelegationSignerRecordSigningAttributes> signingAttributes()
        Returns:
        The information about a key, including the algorithm, public key-value, and flags.
      • get

        public static DelegationSignerRecord get​(java.lang.String name,
                                                 com.pulumi.core.Output<java.lang.String> id,
                                                 @Nullable
                                                 DelegationSignerRecordState state,
                                                 @Nullable
                                                 com.pulumi.resources.CustomResourceOptions options)
        Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
        Parameters:
        name - The _unique_ name of the resulting resource.
        id - The _unique_ provider ID of the resource to lookup.
        state -
        options - Optional settings to control the behavior of the CustomResource.