Skip to content

Commit ad26d3e

Browse files
Add planetarycomputer extension for GeoCatalog management
- AAZ-based extension for Microsoft.Orbital/geoCatalogs (API version 2026-04-15) - Commands: planetarycomputer geocatalog create/show/list/update/delete/wait - Identity commands: geocatalog identity assign/show/remove/wait - Short alias --scope for --auto-generated-domain-name-label-scope - Command examples for create, update, and identity assign - Help text for all command groups - 10 scenario tests with playback recordings - Version 1.0.0b1 (preview)
1 parent da27996 commit ad26d3e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+29975
-0
lines changed

src/planetarycomputer/HISTORY.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.. :changelog:
2+
3+
Release History
4+
===============
5+
6+
1.0.0b1
7+
++++++
8+
* Initial release.

src/planetarycomputer/README.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Azure CLI Planetarycomputer Extension #
2+
This is an extension to Azure CLI to manage Planetary Computer GeoCatalog resources.
3+
4+
## How to use ##
5+
6+
### Install the extension ###
7+
```bash
8+
az extension add --name planetarycomputer
9+
```
10+
11+
### Commands ###
12+
13+
#### GeoCatalog Management ####
14+
```bash
15+
# Create a GeoCatalog
16+
az planetarycomputer geocatalog create -g MyResourceGroup -n MyCatalog -l eastus
17+
18+
# Show a GeoCatalog
19+
az planetarycomputer geocatalog show -g MyResourceGroup -n MyCatalog
20+
21+
# List GeoCatalogs in a resource group
22+
az planetarycomputer geocatalog list -g MyResourceGroup
23+
24+
# List all GeoCatalogs in a subscription
25+
az planetarycomputer geocatalog list
26+
27+
# Update tags on a GeoCatalog
28+
az planetarycomputer geocatalog update -g MyResourceGroup -n MyCatalog --tags env=prod
29+
30+
# Delete a GeoCatalog
31+
az planetarycomputer geocatalog delete -g MyResourceGroup -n MyCatalog
32+
33+
# Wait for a GeoCatalog to reach a desired state
34+
az planetarycomputer geocatalog wait -g MyResourceGroup -n MyCatalog --created
35+
```
36+
37+
#### GeoCatalog Identity Management ####
38+
```bash
39+
# Assign a user-assigned managed identity
40+
az planetarycomputer geocatalog identity assign -g MyResourceGroup -n MyCatalog --user-assigned MyIdentity
41+
42+
# Show identity information
43+
az planetarycomputer geocatalog identity show -g MyResourceGroup -n MyCatalog
44+
45+
# Remove a user-assigned managed identity
46+
az planetarycomputer geocatalog identity remove -g MyResourceGroup -n MyCatalog --user-assigned MyIdentity
47+
```
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# --------------------------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
#
5+
# Code generated by aaz-dev-tools
6+
# --------------------------------------------------------------------------------------------
7+
8+
from azure.cli.core import AzCommandsLoader
9+
from azext_planetarycomputer._help import helps # pylint: disable=unused-import
10+
11+
12+
class PlanetarycomputerCommandsLoader(AzCommandsLoader):
13+
14+
def __init__(self, cli_ctx=None):
15+
from azure.cli.core.commands import CliCommandType
16+
custom_command_type = CliCommandType(
17+
operations_tmpl='azext_planetarycomputer.custom#{}')
18+
super().__init__(cli_ctx=cli_ctx,
19+
custom_command_type=custom_command_type)
20+
21+
def load_command_table(self, args):
22+
from azext_planetarycomputer.commands import load_command_table
23+
from azure.cli.core.aaz import load_aaz_command_table
24+
try:
25+
from . import aaz
26+
except ImportError:
27+
aaz = None
28+
if aaz:
29+
load_aaz_command_table(
30+
loader=self,
31+
aaz_pkg_name=aaz.__name__,
32+
args=args
33+
)
34+
load_command_table(self, args)
35+
return self.command_table
36+
37+
def load_arguments(self, command):
38+
from azext_planetarycomputer._params import load_arguments
39+
load_arguments(self, command)
40+
41+
42+
COMMAND_LOADER_CLS = PlanetarycomputerCommandsLoader
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# --------------------------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
#
5+
# Code generated by aaz-dev-tools
6+
# --------------------------------------------------------------------------------------------
7+
8+
# pylint: disable=line-too-long
9+
# pylint: disable=too-many-lines
10+
11+
from knack.help_files import helps # pylint: disable=unused-import
12+
13+
helps['planetarycomputer'] = """
14+
type: group
15+
short-summary: Manage Planetary Computer resources.
16+
"""
17+
18+
helps['planetarycomputer geocatalog'] = """
19+
type: group
20+
short-summary: Manage Planetary Computer GeoCatalog resources.
21+
"""
22+
23+
helps['planetarycomputer geocatalog create'] = """
24+
type: command
25+
short-summary: Create a GeoCatalog.
26+
examples:
27+
- name: Create a GeoCatalog with default settings
28+
text: |-
29+
az planetarycomputer geocatalog create -g MyResourceGroup -n MyCatalog -l eastus
30+
- name: Create a GeoCatalog with a user-assigned identity
31+
text: |-
32+
az planetarycomputer geocatalog create -g MyResourceGroup -n MyCatalog -l eastus \\
33+
--user-assigned "/subscriptions/{sub}/resourcegroups/{rg}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{name}"
34+
"""
35+
36+
helps['planetarycomputer geocatalog update'] = """
37+
type: command
38+
short-summary: Update a GeoCatalog.
39+
examples:
40+
- name: Update tags on a GeoCatalog
41+
text: |-
42+
az planetarycomputer geocatalog update -g MyResourceGroup -n MyCatalog --tags env=prod team=platform
43+
"""
44+
45+
helps['planetarycomputer geocatalog identity'] = """
46+
type: group
47+
short-summary: Manage identities for a Planetary Computer GeoCatalog.
48+
"""
49+
50+
helps['planetarycomputer geocatalog identity assign'] = """
51+
type: command
52+
short-summary: Assign an identity to a GeoCatalog.
53+
examples:
54+
- name: Assign a user-assigned managed identity
55+
text: |-
56+
az planetarycomputer geocatalog identity assign -g MyResourceGroup -n MyCatalog \\
57+
--user-assigned "/subscriptions/{sub}/resourcegroups/{rg}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{name}"
58+
"""
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# --------------------------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
#
5+
# Code generated by aaz-dev-tools
6+
# --------------------------------------------------------------------------------------------
7+
8+
# pylint: disable=too-many-lines
9+
# pylint: disable=too-many-statements
10+
11+
12+
def load_arguments(self, _): # pylint: disable=unused-argument
13+
pass
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# --------------------------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
#
5+
# Code generated by aaz-dev-tools
6+
# --------------------------------------------------------------------------------------------
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# --------------------------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
#
5+
# Code generated by aaz-dev-tools
6+
# --------------------------------------------------------------------------------------------
7+
8+
# pylint: skip-file
9+
# flake8: noqa
10+
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# --------------------------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
#
5+
# Code generated by aaz-dev-tools
6+
# --------------------------------------------------------------------------------------------
7+
8+
# pylint: skip-file
9+
# flake8: noqa
10+
11+
from azure.cli.core.aaz import *
12+
13+
14+
@register_command_group(
15+
"planetarycomputer",
16+
)
17+
class __CMDGroup(AAZCommandGroup):
18+
"""Manage Spatio
19+
"""
20+
pass
21+
22+
23+
__all__ = ["__CMDGroup"]
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# --------------------------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
#
5+
# Code generated by aaz-dev-tools
6+
# --------------------------------------------------------------------------------------------
7+
8+
# pylint: skip-file
9+
# flake8: noqa
10+
11+
from .__cmd_group import *
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# --------------------------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
#
5+
# Code generated by aaz-dev-tools
6+
# --------------------------------------------------------------------------------------------
7+
8+
# pylint: skip-file
9+
# flake8: noqa
10+
11+
from azure.cli.core.aaz import *
12+
13+
14+
@register_command_group(
15+
"planetarycomputer geocatalog",
16+
)
17+
class __CMDGroup(AAZCommandGroup):
18+
"""Manage Geo Catalog
19+
"""
20+
pass
21+
22+
23+
__all__ = ["__CMDGroup"]

0 commit comments

Comments
 (0)