Package com.pulumi.aws.ram
Class ResourceAssociation
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.ram.ResourceAssociation
-
public class ResourceAssociation extends com.pulumi.resources.CustomResource
Manages a Resource Access Manager (RAM) Resource Association. > *NOTE:* Certain AWS resources (e.g., EC2 Subnets) can only be shared in an AWS account that is a member of an AWS Organizations organization with organization-wide Resource Access Manager functionality enabled. See the [Resource Access Manager User Guide](https://docs.aws.amazon.com/ram/latest/userguide/what-is.html) and AWS service specific documentation for additional information. ## Example Usage <!--Start PulumiCodeChooser --> ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.aws.ram.ResourceAssociation; import com.pulumi.aws.ram.ResourceAssociationArgs; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { var example = new ResourceAssociation("example", ResourceAssociationArgs.builder() .resourceArn(exampleAwsSubnet.arn()) .resourceShareArn(exampleAwsRamResourceShare.arn()) .build()); } } ``` <!--End PulumiCodeChooser --> ## Import Using `pulumi import`, import RAM Resource Associations using their Resource Share ARN and Resource ARN separated by a comma. For example: ```sh $ pulumi import aws:ram/resourceAssociation:ResourceAssociation example arn:aws:ram:eu-west-1:123456789012:resource-share/73da1ab9-b94a-4ba3-8eb4-45917f7f4b12,arn:aws:ec2:eu-west-1:123456789012:subnet/subnet-12345678 ```
-
-
Constructor Summary
Constructors Constructor Description ResourceAssociation(java.lang.String name)
ResourceAssociation(java.lang.String name, ResourceAssociationArgs args)
ResourceAssociation(java.lang.String name, ResourceAssociationArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ResourceAssociation
get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, ResourceAssociationState 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>
resourceArn()
com.pulumi.core.Output<java.lang.String>
resourceShareArn()
-
-
-
Constructor Detail
-
ResourceAssociation
public ResourceAssociation(java.lang.String name)
- Parameters:
name
- The _unique_ name of the resulting resource.
-
ResourceAssociation
public ResourceAssociation(java.lang.String name, ResourceAssociationArgs args)
- Parameters:
name
- The _unique_ name of the resulting resource.args
- The arguments to use to populate this resource's properties.
-
ResourceAssociation
public ResourceAssociation(java.lang.String name, ResourceAssociationArgs 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
-
resourceArn
public com.pulumi.core.Output<java.lang.String> resourceArn()
- Returns:
- Amazon Resource Name (ARN) of the resource to associate with the RAM Resource Share.
-
resourceShareArn
public com.pulumi.core.Output<java.lang.String> resourceShareArn()
- Returns:
- Amazon Resource Name (ARN) of the RAM Resource Share.
-
get
public static ResourceAssociation get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable ResourceAssociationState 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.
-
-