Interface ResourceEnvironment

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

@Generated(value="jsii-pacmak/1.99.0 (build 8f757e4)", date="2024-06-13T18:49:13.349Z") @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 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.*;
 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