Amplify Toolbox
    Preparing search index...

    Type Alias BackendIdentifier

    BackendIdentifier:
        | {
            hash?: Readonly<string>;
            name: Readonly<BranchName>;
            namespace: Readonly<AppId>;
            type: Readonly<Extract<DeploymentType, "branch">>;
        }
        | {
            hash?: Readonly<string>;
            name: Readonly<SandboxName>;
            namespace: Readonly<ProjectName>;
            type: Readonly<Extract<DeploymentType, "sandbox">>;
        }

    This tuple defines the constituent parts that are used to construct backend stack names The stack name becomes what identifies a deployed backend.

    To translate to/from a stack name, use the utility methods in @aws-amplify/platform-core

    Type declaration

    • {
          hash?: Readonly<string>;
          name: Readonly<BranchName>;
          namespace: Readonly<AppId>;
          type: Readonly<Extract<DeploymentType, "branch">>;
      }
      • Optionalhash?: Readonly<string>

        Optional hash for consistent stack naming in cases where namespace or name contain characters that can't be serialized into a stack name

      • name: Readonly<BranchName>

        The Amplify branch name for the backend

      • namespace: Readonly<AppId>

        The Amplify AppId for the backend

      • type: Readonly<Extract<DeploymentType, "branch">>

        Const that determines this BackendIdentifier is for a branch backend

    • {
          hash?: Readonly<string>;
          name: Readonly<SandboxName>;
          namespace: Readonly<ProjectName>;
          type: Readonly<Extract<DeploymentType, "sandbox">>;
      }
      • Optionalhash?: Readonly<string>

        Optional hash for consistent stack naming in cases where namespace or name contain characters that can't be serialized into a stack name

      • name: Readonly<SandboxName>

        The name of this sandbox.

        While this type does not enforce any specific behavior, at the time of writing, this value defaults to the current local username and can be overridden with the --name argument to sandbox. Consult upstream code for exact usage.

      • namespace: Readonly<ProjectName>

        The project name for the sandbox.

        While this type does not enforce any specific behavior, at the time of writing, this value defaults to package.json#name when running sandbox commands Consult upstream code for exact usage.

      • type: Readonly<Extract<DeploymentType, "sandbox">>

        Const that determines this BackendIdentifier is for a sandbox backend