Package com.pulumi.aws.ec2
Class ManagedPrefixListEntry
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.ec2.ManagedPrefixListEntry
-
public class ManagedPrefixListEntry extends com.pulumi.resources.CustomResourceUse the `aws.ec2.ManagedPrefixListEntry` resource to manage a managed prefix list entry. > **NOTE:** Pulumi currently provides two resources for managing Managed Prefix Lists and Managed Prefix List Entries. The standalone resource, Managed Prefix List Entry, is used to manage a single entry. The Managed Prefix List resource is used to manage multiple entries defined in-line. It is important to note that you cannot use a Managed Prefix List with in-line rules in conjunction with any Managed Prefix List Entry resources. This will result in a conflict of entries and will cause the entries to be overwritten. > **NOTE:** To improve execution times on larger updates, it is recommended to use the inline `entry` block as part of the Managed Prefix List resource when creating a prefix list with more than 100 entries. You can find more information about the resource here. ## Example Usage Basic usage.
## Import Using `pulumi import`, import prefix list entries using `prefixListId` and `cidr` separated by a comma (`,`). For example: ```sh $ pulumi import aws:ec2/managedPrefixListEntry:ManagedPrefixListEntry default pl-0570a1d2d725c16be,10.0.3.0/24 ```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.ManagedPrefixListEntry; import com.pulumi.aws.ec2.ManagedPrefixListEntryArgs; 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 example = new ManagedPrefixList("example", ManagedPrefixListArgs.builder() .name("All VPC CIDR-s") .addressFamily("IPv4") .maxEntries(5) .tags(Map.of("Env", "live")) .build()); var entry1 = new ManagedPrefixListEntry("entry1", ManagedPrefixListEntryArgs.builder() .cidr(exampleAwsVpc.cidrBlock()) .description("Primary") .prefixListId(example.id()) .build()); } }
-
-
Constructor Summary
Constructors Constructor Description ManagedPrefixListEntry(java.lang.String name)ManagedPrefixListEntry(java.lang.String name, ManagedPrefixListEntryArgs args)ManagedPrefixListEntry(java.lang.String name, ManagedPrefixListEntryArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.lang.String>cidr()com.pulumi.core.Output<java.util.Optional<java.lang.String>>description()static ManagedPrefixListEntryget(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, ManagedPrefixListEntryState 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>prefixListId()com.pulumi.core.Output<java.lang.String>region()
-
-
-
Constructor Detail
-
ManagedPrefixListEntry
public ManagedPrefixListEntry(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
ManagedPrefixListEntry
public ManagedPrefixListEntry(java.lang.String name, ManagedPrefixListEntryArgs args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
ManagedPrefixListEntry
public ManagedPrefixListEntry(java.lang.String name, ManagedPrefixListEntryArgs 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
-
cidr
public com.pulumi.core.Output<java.lang.String> cidr()
- Returns:
- CIDR block of this entry.
-
description
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> description()
- Returns:
- Description of this entry. Please note that due to API limitations, updating only the description of an entry will require recreating the entry.
-
prefixListId
public com.pulumi.core.Output<java.lang.String> prefixListId()
- Returns:
- The ID of the prefix list.
-
region
public com.pulumi.core.Output<java.lang.String> region()
- Returns:
- Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
-
get
public static ManagedPrefixListEntry get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable ManagedPrefixListEntryState 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.
-
-