Amplify Toolbox
    Preparing search index...

    Type Alias StorageAccessDefinition

    type StorageAccessDefinition = {
        actions: StorageAction[];
        getResourceAccessAcceptors: (
            (
                getInstanceProps: ConstructFactoryGetInstanceProps,
            ) => ResourceAccessAcceptor
        )[];
        idSubstitution: string;
        uniqueDefinitionIdValidations: {
            uniqueDefinitionId: string;
            validationErrorOptions: AmplifyUserErrorOptions;
        }[];
    }
    Index

    Properties

    actions: StorageAction[]

    Actions to grant to this role on a specific prefix

    getResourceAccessAcceptors: (
        (
            getInstanceProps: ConstructFactoryGetInstanceProps,
        ) => ResourceAccessAcceptor
    )[]
    idSubstitution: string

    The value that will be substituted into the resource string in place of the {owner} token

    uniqueDefinitionIdValidations: {
        uniqueDefinitionId: string;
        validationErrorOptions: AmplifyUserErrorOptions;
    }[]

    Evaluation of the access definition will ensure that all uniqueDefinitionIds occur at most once for a given access path. This can be used to validate against definitions like

    { 'foo/*': [ allow.authenticated.to(['read']), allow.authenticated.to(['write']) ] }

    and instead require such a definition to be specified as

    { 'foo/*': [ allow.authenticated.to(['read', 'write']), ] }

    The validationErrorMessage will be used to print an error message in case of validation failure

    An empty array means that no uniqueness will be enforced