Interface ResourceEnvironment

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
ResourceEnvironment.Jsii$Proxy

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:29:55.104Z") @Stability(Stable) public interface ResourceEnvironment extends software.amazon.jsii.JsiiSerializable
Represents the environment a given resource lives in.

Used as the return value for the

invalid @link
IResource.env
property.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.core.*;
 ResourceEnvironment resourceEnvironment = ResourceEnvironment.builder()
         .account("account")
         .region("region")
         .build();
 
  • Method Details

    • getAccount

      @Stability(Stable) @NotNull String getAccount()
      The AWS account ID that this resource belongs to.

      Since this can be a Token (for example, when the account is CloudFormation's AWS::AccountId intrinsic), make sure to use Token.compareStrings() instead of just comparing the values for equality.

    • getRegion

      @Stability(Stable) @NotNull String getRegion()
      The AWS region that this resource belongs to.

      Since this can be a Token (for example, when the region is CloudFormation's AWS::Region intrinsic), make sure to use Token.compareStrings() instead of just comparing the values for equality.

    • builder

      @Stability(Stable) static ResourceEnvironment.Builder builder()
      Returns:
      a ResourceEnvironment.Builder of ResourceEnvironment