Skip to content
Draft
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -1641,6 +1641,9 @@ sdk/workloadorchestration/arm-workloadorchestration/ @qiaozha @MaryGao
# PRLabel: %Mgmt
sdk/compute/arm-computerecommender/ @qiaozha @MaryGao

# PRLabel: %Mgmt
sdk/planetarycomputer/planetarycomputer/ @qiaozha @MaryGao

###########
# Config
###########
Expand Down
99 changes: 99 additions & 0 deletions .vscode/cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,105 @@
"words": [
"protobuf"
]
},
{
"filename": "sdk/planetarycomputer/planetarycomputer/**",
"words": [
"afmhot",
"Afmhot",
"Alos",
"brbg",
"Brbg",
"bugn",
"Bugn",
"bupu",
"Bupu",
"cfastie",
"Cfastie",
"chloris",
"Chloris",
"cividis",
"Cividis",
"cmrmap",
"Cmrmap",
"drcog",
"Drcog",
"dtype",
"GFET",
"GFPET",
"gnbu",
"Gnbu",
"lanczos",
"Lanczos",
"lcmap",
"Lcmap",
"lulc",
"Lulc",
"maxx",
"maxy",
"miny",
"modis",
"Modis",
"mtbs",
"Mtbs",
"ncar",
"Ncar",
"nipy",
"Nipy",
"nrcan",
"Nrcan",
"orrd",
"Orrd",
"palsar",
"piyg",
"Piyg",
"pngraw",
"Pngraw",
"prgn",
"Prgn",
"pubu",
"Pubu",
"pubugn",
"Pubugn",
"puor",
"Puor",
"purd",
"Purd",
"rdbu",
"Rdbu",
"rdgy",
"Rdgy",
"rdpu",
"Rdpu",
"rdylbu",
"Rdylbu",
"rdylgn",
"Rdylgn",
"rplumbo",
"Rplumbo",
"stac",
"Stac",
"stdev",
"terrainrgb",
"Terrainrgb",
"usgs",
"Usgs",
"viirs",
"Viirs",
"viridis",
"Viridis",
"Wmts",
"yarg",
"Yarg",
"ylgn",
"Ylgn",
"ylgnbu",
"Ylgnbu",
"ylorbr",
"Ylorbr",
"ylorrd",
"Ylorrd"
]
}
]
}
1 change: 1 addition & 0 deletions eng/ignore-links.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,4 @@ https://learn.microsoft.com/javascript/api/@azure/arm-storagediscovery?view=azur
https://learn.microsoft.com/javascript/api/@azure/arm-azurestackhcivm?view=azure-node-preview
https://learn.microsoft.com/javascript/api/@azure/arm-workloadorchestration?view=azure-node-preview
https://learn.microsoft.com/javascript/api/@azure/arm-computerecommender?view=azure-node-preview
https://learn.microsoft.com/javascript/api/@azure-rest/planetarycomputer?view=azure-node-preview
84 changes: 83 additions & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions sdk/planetarycomputer/ci.mgmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ trigger:
include:
- sdk/planetarycomputer/arm-planetarycomputer
- sdk/planetarycomputer/ci.mgmt.yml
- sdk/planetarycomputer/planetarycomputer
pr:
branches:
include:
Expand All @@ -26,10 +27,13 @@ pr:
include:
- sdk/planetarycomputer/arm-planetarycomputer
- sdk/planetarycomputer/ci.mgmt.yml
- sdk/planetarycomputer/planetarycomputer
extends:
template: /eng/pipelines/templates/stages/archetype-sdk-client.yml
parameters:
ServiceDirectory: planetarycomputer
Artifacts:
- name: azure-arm-planetarycomputer
safeName: azurearmplanetarycomputer
- name: azure-rest-planetarycomputer
safeName: azurerestplanetarycomputer
7 changes: 7 additions & 0 deletions sdk/planetarycomputer/planetarycomputer/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Release History

## 1.0.0-beta.1 (2025-10-31)

### Features Added

Initial release of the @azure-rest/planetarycomputer package
21 changes: 21 additions & 0 deletions sdk/planetarycomputer/planetarycomputer/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Copyright (c) Microsoft Corporation.

MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
109 changes: 109 additions & 0 deletions sdk/planetarycomputer/planetarycomputer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
# Azure PlanetaryComputerPro client library for JavaScript

This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure PlanetaryComputerPro client.



Key links:

- [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/planetarycomputer/planetarycomputer)
- [Package (NPM)](https://www.npmjs.com/package/@azure-rest/planetarycomputer)
- [API reference documentation](https://learn.microsoft.com/javascript/api/@azure-rest/planetarycomputer?view=azure-node-preview)

## Getting started

### Currently supported environments

- [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule)
- Latest versions of Safari, Chrome, Edge and Firefox.

See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details.

### Prerequisites

- An [Azure subscription][azure_sub].

### Install the `@azure-rest/planetarycomputer` package

Install the Azure PlanetaryComputerPro client library for JavaScript with `npm`:

```bash
npm install @azure-rest/planetarycomputer
```

### Create and authenticate a `PlanetaryComputerProClient`

To create a client object to access the Azure PlanetaryComputerPro API, you will need the `endpoint` of your Azure PlanetaryComputerPro resource and a `credential`. The Azure PlanetaryComputerPro client can use Azure Active Directory credentials to authenticate.
You can find the endpoint for your Azure PlanetaryComputerPro resource in the [Azure Portal][azure_portal].

You can authenticate with Azure Active Directory using a credential from the [@azure/identity][azure_identity] library or [an existing AAD Token](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token).

To use the [DefaultAzureCredential][defaultazurecredential] provider shown below, or other credential providers provided with the Azure SDK, please install the `@azure/identity` package:

```bash
npm install @azure/identity
```

You will also need to **register a new AAD application and grant access to Azure PlanetaryComputerPro** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions).

For more information about how to create an Azure AD Application check out [this guide](https://learn.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal).

Using Node.js and Node-like environments, you can use the `DefaultAzureCredential` class to authenticate the client.

```ts snippet:ReadmeSampleCreateClient_Node
import { PlanetaryComputerProClient } from "@azure-rest/planetarycomputer";
import { DefaultAzureCredential } from "@azure/identity";

const client = new PlanetaryComputerProClient("<endpoint>", new DefaultAzureCredential());
```

For browser environments, use the `InteractiveBrowserCredential` from the `@azure/identity` package to authenticate.

```ts snippet:ReadmeSampleCreateClient_Browser
import { InteractiveBrowserCredential } from "@azure/identity";
import { PlanetaryComputerProClient } from "@azure-rest/planetarycomputer";

const credential = new InteractiveBrowserCredential({
tenantId: "<YOUR_TENANT_ID>",
clientId: "<YOUR_CLIENT_ID>",
});
const client = new PlanetaryComputerProClient("<endpoint>", credential);
```


### JavaScript Bundle
To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling).

## Key concepts

### PlanetaryComputerProClient

`PlanetaryComputerProClient` is the primary interface for developers using the Azure PlanetaryComputerPro client library. Explore the methods on this client object to understand the different features of the Azure PlanetaryComputerPro service that you can access.

## Troubleshooting

### Logging

Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`:

```ts snippet:SetLogLevel
import { setLogLevel } from "@azure/logger";

setLogLevel("info");
```

For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger).


## Contributing

If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md) to learn more about how to build and test the code.

## Related projects

- [Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js)

[azure_sub]: https://azure.microsoft.com/free/
[azure_portal]: https://portal.azure.com
[azure_identity]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity
[defaultazurecredential]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#defaultazurecredential
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ "extends": "../../../api-extractor-base.json" }
14 changes: 14 additions & 0 deletions sdk/planetarycomputer/planetarycomputer/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import azsdkEslint from "@azure/eslint-plugin-azure-sdk";

export default azsdkEslint.config([
{
rules: {
"@azure/azure-sdk/ts-modules-only-named": "warn",
"@azure/azure-sdk/ts-package-json-types": "warn",
"@azure/azure-sdk/ts-package-json-engine-is-present": "warn",
"@azure/azure-sdk/ts-package-json-files-required": "off",
"@azure/azure-sdk/ts-package-json-main-is-cjs": "off",
"tsdoc/syntax": "warn",
},
},
]);
Loading
Loading