Class IamResource

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.appsync.IamResource
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-22T02:23:57.192Z") @Stability(Stable) public class IamResource extends software.amazon.jsii.JsiiObject
A class used to generate resource arns for AppSync.

Example:

 IGraphqlApi api;
 Role role = Role.Builder.create(this, "Role")
         .assumedBy(new ServicePrincipal("lambda.amazonaws.com"))
         .build();
 api.grant(role, IamResource.custom("types/Mutation/fields/updateExample"), "appsync:GraphQL");
 
  • Nested Class Summary

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

    software.amazon.jsii.JsiiObject.InitializationMode
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    IamResource(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    IamResource(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    all()
    Generate the resource names that accepts all types: *.
    custom(@NotNull String... arns)
    Generate the resource names given custom arns.
    ofType(String type, @NotNull String... fields)
    Generate the resource names given a type and fields.
    Return the Resource ARN.

    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, toString, wait, wait, wait

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Constructor Details

    • IamResource

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

      protected IamResource(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
  • Method Details

    • all

      @Stability(Stable) @NotNull public static IamResource all()
      Generate the resource names that accepts all types: *.
    • custom

      @Stability(Stable) @NotNull public static IamResource custom(@NotNull @NotNull String... arns)
      Generate the resource names given custom arns.

      Parameters:
      arns - The custom arns that need to be permissioned. This parameter is required.
    • ofType

      @Stability(Stable) @NotNull public static IamResource ofType(@NotNull String type, @NotNull @NotNull String... fields)
      Generate the resource names given a type and fields.

      Parameters:
      type - The type that needs to be allowed. This parameter is required.
      fields - The fields that need to be allowed, if empty grant permissions to ALL fields. This parameter is required.
    • resourceArns

      @Stability(Stable) @NotNull public List<String> resourceArns(@NotNull GraphqlApiBase api)
      Return the Resource ARN.

      Parameters:
      api - The GraphQL API to give permissions. This parameter is required.