Class AssertionsProvider

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.integtests.alpha.AssertionsProvider
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.94.0 (build b380f01)", date="2024-03-01T20:58:32.758Z") @Stability(Experimental) public class AssertionsProvider extends software.constructs.Construct
(experimental) Represents an assertions provider.

The creates a singletone Lambda Function that will create a single function per stack that serves as the custom resource provider for the various assertion providers

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.integtests.alpha.*;
 AssertionsProvider assertionsProvider = AssertionsProvider.Builder.create(this, "MyAssertionsProvider")
         .handler("handler")
         .uuid("uuid")
         .build();
 
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    (experimental) A fluent builder for AssertionsProvider.

    Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

    software.amazon.jsii.JsiiObject.InitializationMode

    Nested classes/interfaces inherited from interface software.constructs.IConstruct

    software.constructs.IConstruct.Jsii$Default, software.constructs.IConstruct.Jsii$Proxy
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    AssertionsProvider(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    AssertionsProvider(software.amazon.jsii.JsiiObjectRef objRef)
     
     
    AssertionsProvider(software.constructs.Construct scope, String id)
     
     
    AssertionsProvider(software.constructs.Construct scope, String id, AssertionsProviderProps props)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    (experimental) Create a policy statement from a specific api call.
    void
    (experimental) Create a policy statement from a specific api call.
    void
    (experimental) Add an IAM policy statement to the inline policy of the lambdas function's role.
    (experimental) Encode an object so it can be passed as custom resource parameters.
    (experimental) A reference to the provider Lambda Function execution Role ARN.
    (experimental) The ARN of the lambda function which can be used as a serviceToken to a CustomResource.
    void
    grantInvoke(String principalArn)
    (experimental) Grant a principal access to invoke the assertion provider lambda function.

    Methods inherited from class software.constructs.Construct

    getNode, isConstruct, toString

    Methods inherited from class software.amazon.jsii.JsiiObject

    jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Constructor Details

    • AssertionsProvider

      protected AssertionsProvider(software.amazon.jsii.JsiiObjectRef objRef)
    • AssertionsProvider

      protected AssertionsProvider(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • AssertionsProvider

      @Stability(Experimental) public AssertionsProvider(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable AssertionsProviderProps props)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      props -
    • AssertionsProvider

      @Stability(Experimental) public AssertionsProvider(@NotNull software.constructs.Construct scope, @NotNull String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
  • Method Details

    • addPolicyStatementFromSdkCall

      @Stability(Experimental) public void addPolicyStatementFromSdkCall(@NotNull String service, @NotNull String api, @Nullable List<String> resources)
      (experimental) Create a policy statement from a specific api call.

      Parameters:
      service - This parameter is required.
      api - This parameter is required.
      resources -
    • addPolicyStatementFromSdkCall

      @Stability(Experimental) public void addPolicyStatementFromSdkCall(@NotNull String service, @NotNull String api)
      (experimental) Create a policy statement from a specific api call.

      Parameters:
      service - This parameter is required.
      api - This parameter is required.
    • addToRolePolicy

      @Stability(Experimental) public void addToRolePolicy(@NotNull Object statement)
      (experimental) Add an IAM policy statement to the inline policy of the lambdas function's role.

      Please note: this is a direct IAM JSON policy blob, not a iam.PolicyStatement object like you will see in the rest of the CDK.

      Example:

       AssertionsProvider provider;
       provider.addToRolePolicy(Map.of(
               "Effect", "Allow",
               "Action", List.of("s3:GetObject"),
               "Resource", List.of("*")));
       

      Parameters:
      statement - This parameter is required.
    • encode

      @Stability(Experimental) @NotNull public Object encode(@NotNull Object obj)
      (experimental) Encode an object so it can be passed as custom resource parameters.

      Custom resources will convert all input parameters to strings so we encode non-strings here so we can then decode them correctly in the provider function

      Parameters:
      obj - This parameter is required.
    • grantInvoke

      @Stability(Experimental) public void grantInvoke(@NotNull String principalArn)
      (experimental) Grant a principal access to invoke the assertion provider lambda function.

      Parameters:
      principalArn - the ARN of the principal that should be given permission to invoke the assertion provider. This parameter is required.
    • getHandlerRoleArn

      @Stability(Experimental) @NotNull public Reference getHandlerRoleArn()
      (experimental) A reference to the provider Lambda Function execution Role ARN.
    • getServiceToken

      @Stability(Experimental) @NotNull public String getServiceToken()
      (experimental) The ARN of the lambda function which can be used as a serviceToken to a CustomResource.