As a SaaS producer or platform administrator, you can use App Lifecycle Manager to
inspect and update SaaS offerings, unit kinds, and units after deployment to
adjust regions, labels, default releases, and maintenance pinning. These updates
change configuration metadata without triggering infrastructure provisioning. To
roll out infrastructure changes, see
[Update a SaaS offering](https://docs.cloud.google.com/app-lifecycle-manager/update-saas-offering.md.txt). For
conceptual background, see the
[App Lifecycle Manager overview](https://docs.cloud.google.com/app-lifecycle-manager/overview.md.txt).

## Before you begin

<br />

### Required roles


To get the permissions that
you need to view and update App Lifecycle Manager resources,

ask your administrator to grant you the
following IAM roles on your project:

- View resources: [SaaS Service Management Viewer](https://docs.cloud.google.com/iam/docs/roles-permissions/saasservicemgmt.md.txt#saasservicemgmt.viewer) (`roles/saasservicemgmt.viewer`)
- View and update resources: [SaaS Service Management Admin](https://docs.cloud.google.com/iam/docs/roles-permissions/saasservicemgmt.md.txt#saasservicemgmt.admin) (`roles/saasservicemgmt.admin`)


For more information about granting roles, see [Manage access to projects, folders, and organizations](https://docs.cloud.google.com/iam/docs/granting-changing-revoking-access.md.txt).


You might also be able to get
the required permissions through [custom
roles](https://docs.cloud.google.com/iam/docs/creating-custom-roles) or other [predefined
roles](https://docs.cloud.google.com/iam/docs/roles-overview#predefined).

## Inspect resources

Before editing a resource, inspect its configuration, locations, and labels to
verify which properties you can modify. Select one of the following options:

### Console

1. In the Google Cloud console, go to the **SaaS offerings** page:

   [Go to SaaS offerings](https://console.cloud.google.com/saas/saasOfferings)
2. Click a SaaS offering name, or select **Unit kinds** or **Units** in the
   navigation menu and click a resource name.

### gcloud

List SaaS offerings by using the
[`gcloud app-lifecycle-manager saas list` command](https://docs.cloud.google.com/sdk/gcloud/reference/app-lifecycle-manager/saas/list.md.txt):

```bash
gcloud app-lifecycle-manager saas list --location=LOCATION
```

Replace `LOCATION` with the resource location, such as
`global` or `us-central1`.

Describe a specific SaaS offering by using the
[`gcloud app-lifecycle-manager saas describe` command](https://docs.cloud.google.com/sdk/gcloud/reference/app-lifecycle-manager/saas/describe.md.txt):

```bash
gcloud app-lifecycle-manager saas describe \
    SAAS_OFFERING_NAME --location=LOCATION
```

Replace the following:

- `SAAS_OFFERING_NAME`: the name of the SaaS offering
- `LOCATION`: the resource location, such as `global` or `us-central1`

List unit kinds by using the
[`gcloud app-lifecycle-manager unit-kinds list` command](https://docs.cloud.google.com/sdk/gcloud/reference/app-lifecycle-manager/unit-kinds/list.md.txt):

```bash
gcloud app-lifecycle-manager unit-kinds list --location=LOCATION
```

Replace `LOCATION` with the resource location, such as
`global` or `us-central1`.

List units by using the
[`gcloud app-lifecycle-manager units list` command](https://docs.cloud.google.com/sdk/gcloud/reference/app-lifecycle-manager/units/list.md.txt):

```bash
gcloud app-lifecycle-manager units list --location=LOCATION
```

Replace `LOCATION` with a regional location, such as
`us-central1`. Units are stored only in regional locations and are not
replicated to `global`.

To inspect an individual unit kind or unit, use the
[`gcloud app-lifecycle-manager unit-kinds describe` command](https://docs.cloud.google.com/sdk/gcloud/reference/app-lifecycle-manager/unit-kinds/describe.md.txt)
or
[`gcloud app-lifecycle-manager units describe` command](https://docs.cloud.google.com/sdk/gcloud/reference/app-lifecycle-manager/units/describe.md.txt).

## Edit a SaaS offering

You can update the available regions, labels, and connected
Application Design Center composite template for a SaaS offering. The resource
name and parent location are immutable. Select one of the following options:

### Console

1. In the Google Cloud console, go to the **SaaS offerings** page:

   [Go to SaaS offerings](https://console.cloud.google.com/saas/saasOfferings)
2. In the **Name** column, click the SaaS offering that you want to update.

3. On the **SaaS offering details** page, click
   **Edit**.

4. In the **Region** list, select or clear regions and click **OK** , or
   in the **Labels** section, add, edit, or remove key-value pairs.

5. Click **Save**.

### gcloud

Update a SaaS offering's regions or labels by using the
[`gcloud app-lifecycle-manager saas update` command](https://docs.cloud.google.com/sdk/gcloud/reference/app-lifecycle-manager/saas/update.md.txt):

```bash
gcloud app-lifecycle-manager saas update \
    SAAS_OFFERING_NAME --location=LOCATION \
    --add-locations=name=REGION \
    --update-labels=KEY=VALUE
```

Replace the following:

- `SAAS_OFFERING_NAME`: the name of the SaaS offering
- `LOCATION`: the location of the SaaS offering
- `REGION`: a Google Cloud region to add, such as `europe-west1`
- `KEY`: the label key to add or update
- `VALUE`: the label value to add or update

To remove locations or labels, pass
`--remove-locations=name=REGION` or
`--remove-labels=KEY`.

> [!CAUTION]
> **Caution:** Unlike the Google Cloud console, `gcloud app-lifecycle-manager saas update` updates only the specified `--location` and does not replicate changes across regions. To prevent global and regional copies from drifting, see [App Lifecycle Manager regionalization](https://docs.cloud.google.com/app-lifecycle-manager/regionalization.md.txt).

### Connect a new template

If no App Design Center composite template is connected to your
SaaS offering, connect an existing template or create a new one:

### Console

1. On the **SaaS offering details** page under **Connected application
   template** , click **Connect existing template** to select an existing template, or click **Create new template** to design one in App Design Center.
2. Follow the prompts to connect the template to your SaaS offering.

### gcloud

Connect a composite template in the source region by passing its full
resource name to `--application-template` with
[`gcloud app-lifecycle-manager saas update`](https://docs.cloud.google.com/sdk/gcloud/reference/app-lifecycle-manager/saas/update.md.txt):

```bash
gcloud app-lifecycle-manager saas update \
    SAAS_OFFERING_NAME --location=LOCATION \
    --application-template=projects/PROJECT_ID/locations/LOCATION/spaces/SPACE/applicationTemplates/TEMPLATE_ID
```

Replace the following:

- `SAAS_OFFERING_NAME`: the name of the SaaS offering
- `LOCATION`: the source region of the SaaS offering
- `PROJECT_ID`: the Google Cloud project ID
- `SPACE`: the App Design Center space ID
- `TEMPLATE_ID`: the composite template ID

### Update a connected template

When a App Design Center composite template is already connected,
you can update the template revision, edit the template in the design canvas,
update dependencies, or disconnect the template:

### Console

1. On the **SaaS offering details** page under **Connected application
   template** , click **Manage template**.
2. Select one of the following options:
   - **Update template revision**: Choose a newer template revision to update to and trigger template resynchronization.
   - **Configure in canvas**: Open the template in the App Design Center canvas to modify its components and configurations.
   - **Edit dependencies**: Open the template details to update its dependencies.
   - **Disconnect template**: Remove the association between the template and the SaaS offering without deleting imported resources.

### gcloud

Switch a connected template revision in the source region by passing the
full revision resource name to `--application-template-revision` with
[`gcloud app-lifecycle-manager saas update`](https://docs.cloud.google.com/sdk/gcloud/reference/app-lifecycle-manager/saas/update.md.txt):

```bash
gcloud app-lifecycle-manager saas update \
    SAAS_OFFERING_NAME --location=LOCATION \
    --application-template-revision=projects/PROJECT_ID/locations/LOCATION/spaces/SPACE/applicationTemplates/TEMPLATE_ID/revisions/REVISION_ID
```

Replace the following:

- `SAAS_OFFERING_NAME`: the name of the SaaS offering
- `LOCATION`: the source region of the SaaS offering
- `PROJECT_ID`: the Google Cloud project ID
- `SPACE`: the App Design Center space ID
- `TEMPLATE_ID`: the composite template ID
- `REVISION_ID`: the template revision ID

Changing the template revision triggers template resynchronization rather
than a metadata-only update.

## Edit a unit kind

You can update a unit kind's default release and labels in the Google Cloud console
or by using the Google Cloud CLI. The unit kind name, parent SaaS offering, and
dependencies are immutable. For unit kinds imported from a composite template,
manage dependencies and variable mappings in App Design Center.
Select one of the following options:

### Console

1. In the Google Cloud console, go to the **Unit kinds** page:

   [Go to Unit kinds](https://console.cloud.google.com/saas/unitKinds)
2. In the **Name** column, click the unit kind that you want to update.

3. On the **Unit kind details** page, click
   **Edit**.

4. In the **Default release** list, select a release or **No default
   release** , and update labels in the **Labels** section.

5. Click **Save**.

### gcloud

Update a unit kind by using the
[`gcloud app-lifecycle-manager unit-kinds update` command](https://docs.cloud.google.com/sdk/gcloud/reference/app-lifecycle-manager/unit-kinds/update.md.txt):

```bash
gcloud app-lifecycle-manager unit-kinds update \
    UNIT_KIND_NAME --location=LOCATION \
    --default-release=RELEASE_NAME \
    --update-labels=KEY=VALUE
```

Replace the following:

- `UNIT_KIND_NAME`: the name of the unit kind
- `LOCATION`: the location of the unit kind
- `RELEASE_NAME`: the default release name for units
- `KEY`: the label key to add or update
- `VALUE`: the label value to add or update

To unset the default release, pass the `--clear-default-release` flag
directly after `UNIT_KIND_NAME`:

```bash
gcloud app-lifecycle-manager unit-kinds update \
    UNIT_KIND_NAME --clear-default-release \
    --location=LOCATION
```

> [!CAUTION]
> **Caution:** Unlike the Google Cloud console, `gcloud app-lifecycle-manager unit-kinds update` updates only the specified `--location` and does not replicate changes across regions. To prevent global and regional copies from drifting, see [App Lifecycle Manager regionalization](https://docs.cloud.google.com/app-lifecycle-manager/regionalization.md.txt).

## Edit a unit

You can update a unit's labels, tenant association, and maintenance pinning
settings without triggering infrastructure provisioning. The unit name, unit
kind, and management mode are immutable after creation. To associate a unit
with a tenant or reassign its tenant, see
[Associate a unit with a tenant](https://docs.cloud.google.com/app-lifecycle-manager/create-tenants.md.txt#associate_a_unit_with_a_tenant)
or pass `--tenant` to `gcloud app-lifecycle-manager units update`. Select one of
the following options:

### Console

1. In the Google Cloud console, go to the **Units** page:

   [Go to Units](https://console.cloud.google.com/saas/units)
2. In the **Name** column, click the unit that you want to update.

3. On the **Unit details** page, click
   **Edit**.

4. In the **Labels** section, update key-value pairs, or in the **Pin
   Unit** section, enter a future date and time in the **Pinned Until**
   field (or to unpin the unit, click **Clear date**).

5. Click **Save**.

### gcloud

Update a unit's labels or pin its current release by using the
[`gcloud app-lifecycle-manager units update` command](https://docs.cloud.google.com/sdk/gcloud/reference/app-lifecycle-manager/units/update.md.txt):

```bash
gcloud app-lifecycle-manager units update UNIT_NAME \
    --location=LOCATION \
    --update-labels=KEY=VALUE \
    --maintenance-pinned-until-time=PINNED_UNTIL_TIME
```

Replace the following:

- `UNIT_NAME`: the name of the unit
- `LOCATION`: the location of the unit
- `KEY`: the label key to add or update
- `VALUE`: the label value to add or update
- `PINNED_UNTIL_TIME`: an RFC 3339 timestamp in the future until which rollouts skip upgrading the unit, such as `2099-12-31T23:59:59Z`

To unpin a unit, pass a timestamp in the past, such as
`--maintenance-pinned-until-time=1970-01-01T00:00:00Z`.

## Verify resource updates

Confirm your changes on the resource's details page in the Google Cloud console, or
describe the updated resource by using the gcloud CLI:

```bash
gcloud app-lifecycle-manager units describe UNIT_NAME \
    --location=LOCATION
```

Replace the following:

- `UNIT_NAME`: the name of the unit
- `LOCATION`: the location of the unit

## What's next

- [Update a SaaS offering](https://docs.cloud.google.com/app-lifecycle-manager/update-saas-offering.md.txt) with releases and rollouts.
- [Delete resources](https://docs.cloud.google.com/app-lifecycle-manager/delete-resources.md.txt) when you no longer need them.
- [Configure access control with IAM](https://docs.cloud.google.com/app-lifecycle-manager/access-control.md.txt) for your App Lifecycle Manager resources.