Class PrefixListAssociation


  • public class PrefixListAssociation
    extends com.pulumi.resources.CustomResource
    Associates an EC2 managed prefix list with a Network Manager Cloud WAN core network. Once associated, the prefix list can be referenced in the core network policy document. > **NOTE:** The prefix list must be defined in the [Cloud WAN home region](https://docs.aws.amazon.com/network-manager/latest/cloudwan/what-is-cloudwan.html#cloudwan-home-region) (us-west-2). Although defined in the Cloud WAN home region, the prefix-list based policy will apply globally to all the relevant core network edges (regions) in your core network. ## Example Usage
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.ec2.ManagedPrefixList;
     import com.pulumi.aws.ec2.ManagedPrefixListArgs;
     import com.pulumi.aws.ec2.inputs.ManagedPrefixListEntryArgs;
     import com.pulumi.aws.networkmanager.PrefixListAssociation;
     import com.pulumi.aws.networkmanager.PrefixListAssociationArgs;
     import java.util.ArrayList;
     import java.util.Arrays;
     import java.util.Map;
     import java.io.File;
     import java.nio.file.Files;
     import java.nio.file.Paths;
     
     public class App {
         public static void main(String[] args) {
             Pulumi.run(App::stack);
         }
     
         public static void stack(Context ctx) {
             var prefixList = new ManagedPrefixList("prefixList", ManagedPrefixListArgs.builder()
                 .entries(ManagedPrefixListEntryArgs.builder()
                     .cidr("10.0.0.0/8")
                     .description("Example CIDR")
                     .build())
                 .name("example")
                 .addressFamily("IPv4")
                 .maxEntries(5)
                 .build());
     
             var plAssociation = new PrefixListAssociation("plAssociation", PrefixListAssociationArgs.builder()
                 .coreNetworkId(coreNetwork.id())
                 .prefixListArn(prefixList.arn())
                 .prefixListAlias("exampleprefixlist")
                 .build());
     
         }
     }
     
     
    ## Import ### Identity Schema #### Required * `coreNetworkId` (String) Core network ID. * `prefixListArn` (String) Prefix list ARN. #### Optional * `accountId` (String) AWS Account where this resource is managed. Using `pulumi import`, import `aws.networkmanager.PrefixListAssociation` using the core network ID and prefix list ARN separated by a comma (`,`). For example: ```sh $ pulumi import aws:networkmanager/prefixListAssociation:PrefixListAssociation example core-network-0fab1c1e1e1e1e1e1,arn:aws:ec2:us-west-2:123456789012:prefix-list/pl-0123456789abcdef0 ```
    • 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> coreNetworkId()  
      static PrefixListAssociation get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, PrefixListAssociationState 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<java.lang.String> prefixListAlias()  
      com.pulumi.core.Output<java.lang.String> prefixListArn()  
      • 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

      • PrefixListAssociation

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

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

        public PrefixListAssociation​(java.lang.String name,
                                     PrefixListAssociationArgs 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

      • coreNetworkId

        public com.pulumi.core.Output<java.lang.String> coreNetworkId()
        Returns:
        The ID of the core network to associate the prefix list with.
      • prefixListAlias

        public com.pulumi.core.Output<java.lang.String> prefixListAlias()
        Returns:
        An alias for the prefix list association. This alias can be used to reference the prefix list in the core network policy document. Must start with a letter, be less than 64 characters long, and may only include letters and numbers.
      • prefixListArn

        public com.pulumi.core.Output<java.lang.String> prefixListArn()
        Returns:
        The ARN of the EC2 managed prefix list to associate with the core network.
      • get

        public static PrefixListAssociation get​(java.lang.String name,
                                                com.pulumi.core.Output<java.lang.String> id,
                                                @Nullable
                                                PrefixListAssociationState 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.