Management Hub aktivieren und verwalten

Auf dieser Seite wird beschrieben, wie Sie den Management Hub aktivieren und verwalten.

Management Hub aktivieren

Befehlszeile

  1. In the Google Cloud console, activate Cloud Shell.

    Activate Cloud Shell

    At the bottom of the Google Cloud console, a Cloud Shell session starts and displays a command-line prompt. Cloud Shell is a shell environment with the Google Cloud CLI already installed and with values already set for your current project. It can take a few seconds for the session to initialize.

  2. Aktivieren Sie den Verwaltungshub für ein Projekt, einen Ordner oder eine Organisation mit dem Befehl gcloud alpha storage management-hub enable. In den folgenden Abschnitten wird beschrieben, wie Sie diesen Befehl für die einzelnen Ressourcentypen verwenden.

    Management Hub für ein Projekt aktivieren

    gcloud alpha storage management-hub enable --project=PROJECT_ID

    Wobei:

    PROJECT_ID ist die Projekt-ID. Google Cloud Projekt-IDs sind alphanumerisch, z. B. my-project.

    Management Hub für einen Ordner aktivieren

    gcloud alpha storage management-hub enable --sub-folder=FOLDER_ID

    Wobei:

    FOLDER_ID ist die Google Cloud Ordner-ID. Ordner-IDs sind numerisch, z. B. 123456789012.

    Management Hub für eine Organisation aktivieren

    gcloud alpha storage management-hub enable --organization=ORGANIZATION_ID

    Wobei:

    ORGANIZATION_ID ist die Google Cloud Organisations-ID. Organisations-IDs sind numerisch, z. B. 123456789012.

    Verwenden Sie die folgenden Flags, um namenbasierte Bucket-Filter anzuwenden:

    • --exclude-bucket-ids: Liste der Bucket-IDs, die vom Management Hub-Plan ausgeschlossen werden sollen.
    • --exclude-bucket-regexes: Liste der regulären Ausdrücke für Bucket-IDs, die vom Management Hub-Plan ausgeschlossen werden sollen.
    • --include-bucket-ids: Liste der Bucket-IDs, die in den Management Hub-Plan aufgenommen werden sollen.
    • --include-bucket-regexes: Liste der regulären Ausdrücke für Bucket-IDs, die in den Management Hub-Plan aufgenommen werden sollen.

    Beispiel:

    $gcloud alpha storage management-hub enable --organization=my-org --exclude-bucket-ids="my-bucket" --exclude-bucket-regexes="my-bucket-.*"

    Verwenden Sie die folgenden Flags, um standortbasierte Bucket-Filter anzuwenden:

    • --exclude-locations: Liste der Standorte, die vom Management Hub-Plan ausgeschlossen werden sollen.
    • --include-locations: Liste der Standorte, die in den Management Hub-Plan aufgenommen werden sollen.

    Beispiel:

    $gcloud alpha storage management-hub enable --sub-folder=123456 --include-locations="us-east1","us-west1"

Management Hub-Konfiguration aufrufen

In diesem Abschnitt wird beschrieben, wie Sie die Management Hub-Konfiguration für eine Ressource aufrufen.

Befehlszeile

  1. In the Google Cloud console, activate Cloud Shell.

    Activate Cloud Shell

    At the bottom of the Google Cloud console, a Cloud Shell session starts and displays a command-line prompt. Cloud Shell is a shell environment with the Google Cloud CLI already installed and with values already set for your current project. It can take a few seconds for the session to initialize.

  2. Rufen Sie mit dem Befehl gcloud alpha storage management-hub describe die Konfiguration des Verwaltungshubs für ein Projekt, einen Ordner oder eine Organisation auf. In den folgenden Abschnitten wird beschrieben, wie Sie diesen Befehl für die einzelnen Ressourcentypen verwenden.

    Konfiguration des Verwaltungshubs für ein Projekt aufrufen

    gcloud alpha storage management-hub describe --project=PROJECT_ID

    Wobei:

    PROJECT_ID ist die Projekt-ID. Google Cloud Projekt-IDs sind alphanumerisch, z. B. my-project.

    Management Hub-Konfiguration für einen Ordner aufrufen

    gcloud alpha storage management-hub view --sub-folder=FOLDER_ID

    Wobei:

    FOLDER_ID ist die Google Cloud Ordner-ID. Ordner-IDs sind numerisch, z. B. 123456789012.

    Management Hub-Konfiguration für eine Organisation ansehen

    gcloud alpha storage management-hub describe --organization=ORGANIZATION_ID

    Wobei:

    ORGANIZATION_ID ist die Google Cloud Organisations-ID. Organisations-IDs sind numerisch, z. B. 123456789012.

Management Hub-Konfiguration aktualisieren

In diesem Abschnitt wird beschrieben, wie Sie die Management Hub-Konfiguration für eine Ressource aktualisieren.

Befehlszeile

  1. In the Google Cloud console, activate Cloud Shell.

    Activate Cloud Shell

    At the bottom of the Google Cloud console, a Cloud Shell session starts and displays a command-line prompt. Cloud Shell is a shell environment with the Google Cloud CLI already installed and with values already set for your current project. It can take a few seconds for the session to initialize.

  2. Aktualisieren Sie die Management Hub-Konfiguration für ein Projekt, einen Ordner oder eine Organisation mit dem Befehl gcloud alpha storage management-hub update. In den folgenden Abschnitten wird beschrieben, wie Sie diesen Befehl für die einzelnen Ressourcentypen verwenden.

    Management Hub-Konfiguration für ein Projekt aktualisieren

    gcloud alpha storage management-hub update --project=PROJECT_ID

    Wobei:

    PROJECT_ID ist die Projekt-ID. Google Cloud Projekt-IDs sind alphanumerisch, z. B. my-project.

    Management Hub-Konfiguration für einen Ordner aktualisieren

    Führen Sie in Ihrer Entwicklungsumgebung den folgenden Befehl aus:

    gcloud alpha storage management-hub update --sub-folder=FOLDER_ID

    Wobei:

    FOLDER_ID ist die Google Cloud Ordner-ID. Ordner-IDs sind numerisch, z. B. 123456789012.

    Konfiguration des Verwaltungshubs für eine Organisation aktualisieren

    gcloud alpha storage management-hub update --organization=ORGANIZATION_ID

    Wobei:

    ORGANIZATION_ID ist die Google Cloud Organisations-ID. Organisations-IDs sind numerisch, z. B. 123456789012.

    Informationen zum Anwenden von Bucket-Filtern finden Sie unter Bucket-Filter anwenden.

Management Hub deaktivieren

In diesem Abschnitt wird beschrieben, wie Sie den Verwaltungshub deaktivieren.

Befehlszeile

  1. In the Google Cloud console, activate Cloud Shell.

    Activate Cloud Shell

    At the bottom of the Google Cloud console, a Cloud Shell session starts and displays a command-line prompt. Cloud Shell is a shell environment with the Google Cloud CLI already installed and with values already set for your current project. It can take a few seconds for the session to initialize.

  2. Deaktivieren Sie den Verwaltungshub für ein Projekt, einen Ordner oder eine Organisation mit dem Befehl gcloud alpha storage management-hub disable. In den folgenden Abschnitten wird beschrieben, wie Sie diesen Befehl für die einzelnen Ressourcentypen verwenden.

    gcloud alpha storage management-hub disable --project=PROJECT_ID

    Wobei:

    PROJECT_ID ist die Projekt-ID. Google Cloud Projekt-IDs sind alphanumerisch, z. B. my-project.

    Management Hub für einen Ordner deaktivieren

    gcloud alpha storage management-hub disable --sub-folder=FOLDER_ID

    Wobei:

    FOLDER_ID ist die Google Cloud Ordner-ID. Ordner-IDs sind numerisch, z. B. 123456789012.

    Management Hub für eine Organisation deaktivieren

    gcloud alpha storage management-hub disable --organization=ORGANIZATION_ID

    Wobei:

    ORGANIZATION_ID ist die Google Cloud Organisations-ID. Organisations-IDs sind numerisch, z. B. 123456789012.

Nächste Schritte