@pulumi/esc-sdk 0.12.4 → 0.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -45,8 +45,34 @@ go get github.com/pulumi/esc-sdk/sdk
45
45
 
46
46
  [Go examples](https://www.pulumi.com/docs/esc/development/languages-sdks/go/)
47
47
 
48
+ ### C#/.NET
49
+
50
+ ```shell
51
+ dotnet add package Pulumi.Esc.Sdk
52
+ ```
53
+
54
+ #### Quick Example
55
+
56
+ ```csharp
57
+ using Pulumi.Esc.Sdk;
58
+
59
+ // Create a client using default credentials (PULUMI_ACCESS_TOKEN or CLI login)
60
+ using var client = EscClient.CreateDefault();
61
+
62
+ // Or provide credentials explicitly
63
+ // using var client = EscClient.Create("pul-abc123");
64
+
65
+ // Open and read an environment
66
+ var (env, values) = await client.OpenAndReadEnvironmentAsync("myorg", "myproject", "dev");
67
+ Console.WriteLine(values["dbConnectionString"]);
68
+
69
+ // Get the environment definition as parsed YAML
70
+ var definition = await client.GetEnvironmentAsync("myorg", "myproject", "dev");
71
+ ```
72
+
48
73
  ## API Reference Documentation
49
74
 
50
75
  * [TypeScript/JavaScript](https://www.pulumi.com/docs/reference/pkg/nodejs/pulumi/esc-sdk/)
51
76
  * [Python](https://www.pulumi.com/docs/reference/pkg/python/pulumi_esc_sdk/)
52
77
  * [Go](https://pkg.go.dev/github.com/pulumi/esc-sdk/sdk/go)
78
+ * C# docs coming soon
package/esc/index.js CHANGED
@@ -249,7 +249,7 @@ class EscApi {
249
249
  name: envName,
250
250
  };
251
251
  const resp = yield this.rawApi.createEnvironment(orgName, body);
252
- if (resp.status === 200) {
252
+ if (resp.status === 204) {
253
253
  return;
254
254
  }
255
255
  throw new Error(`Failed to create environment: ${resp.statusText}`);
@@ -324,7 +324,7 @@ class EscApi {
324
324
  deleteEnvironment(orgName, projectName, envName) {
325
325
  return __awaiter(this, void 0, void 0, function* () {
326
326
  const resp = yield this.rawApi.deleteEnvironment(orgName, projectName, envName);
327
- if (resp.status === 200) {
327
+ if (resp.status === 204) {
328
328
  return;
329
329
  }
330
330
  throw new Error(`Failed to delete environment: ${resp.statusText}`);
package/esc/raw/api.d.ts CHANGED
@@ -1237,7 +1237,7 @@ export declare const EscApiFp: (configuration?: Configuration) => {
1237
1237
  * @param {*} [options] Override http request option.
1238
1238
  * @throws {RequiredError}
1239
1239
  */
1240
- createEnvironment(orgName: string, createEnvironment: CreateEnvironment, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Error>>;
1240
+ createEnvironment(orgName: string, createEnvironment: CreateEnvironment, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
1241
1241
  /**
1242
1242
  * Create environment revision tag
1243
1243
  * @summary Create environment revision tag
@@ -1279,7 +1279,7 @@ export declare const EscApiFp: (configuration?: Configuration) => {
1279
1279
  * @param {*} [options] Override http request option.
1280
1280
  * @throws {RequiredError}
1281
1281
  */
1282
- deleteEnvironment(orgName: string, projectName: string, envName: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Error>>;
1282
+ deleteEnvironment(orgName: string, projectName: string, envName: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
1283
1283
  /**
1284
1284
  * Delete environment revision tag
1285
1285
  * @summary Delete environment revision tag
@@ -1515,7 +1515,7 @@ export declare const EscApiFactory: (configuration?: Configuration, basePath?: s
1515
1515
  * @param {*} [options] Override http request option.
1516
1516
  * @throws {RequiredError}
1517
1517
  */
1518
- createEnvironment(orgName: string, createEnvironment: CreateEnvironment, options?: any): AxiosPromise<Error>;
1518
+ createEnvironment(orgName: string, createEnvironment: CreateEnvironment, options?: any): AxiosPromise<void>;
1519
1519
  /**
1520
1520
  * Create environment revision tag
1521
1521
  * @summary Create environment revision tag
@@ -1557,7 +1557,7 @@ export declare const EscApiFactory: (configuration?: Configuration, basePath?: s
1557
1557
  * @param {*} [options] Override http request option.
1558
1558
  * @throws {RequiredError}
1559
1559
  */
1560
- deleteEnvironment(orgName: string, projectName: string, envName: string, options?: any): AxiosPromise<Error>;
1560
+ deleteEnvironment(orgName: string, projectName: string, envName: string, options?: any): AxiosPromise<void>;
1561
1561
  /**
1562
1562
  * Delete environment revision tag
1563
1563
  * @summary Delete environment revision tag
@@ -1798,7 +1798,7 @@ export declare class EscApi extends BaseAPI {
1798
1798
  * @throws {RequiredError}
1799
1799
  * @memberof EscApi
1800
1800
  */
1801
- createEnvironment(orgName: string, createEnvironment: CreateEnvironment, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Error, any, {}>>;
1801
+ createEnvironment(orgName: string, createEnvironment: CreateEnvironment, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>;
1802
1802
  /**
1803
1803
  * Create environment revision tag
1804
1804
  * @summary Create environment revision tag
@@ -1844,7 +1844,7 @@ export declare class EscApi extends BaseAPI {
1844
1844
  * @throws {RequiredError}
1845
1845
  * @memberof EscApi
1846
1846
  */
1847
- deleteEnvironment(orgName: string, projectName: string, envName: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Error, any, {}>>;
1847
+ deleteEnvironment(orgName: string, projectName: string, envName: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>;
1848
1848
  /**
1849
1849
  * Delete environment revision tag
1850
1850
  * @summary Delete environment revision tag
package/esc/raw/api.js CHANGED
@@ -27,7 +27,7 @@ exports.EscApi = exports.EscApiFactory = exports.EscApiFp = exports.EscApiAxiosP
27
27
  * https://openapi-generator.tech
28
28
  * Do not edit the class manually.
29
29
  */
30
- const userAgent = 'esc-sdk/ts/v0.12.4';
30
+ const userAgent = 'esc-sdk/ts/v0.13.1';
31
31
  const axios_1 = __importDefault(require("axios"));
32
32
  // Some imports not used depending on template conditions
33
33
  // @ts-ignore
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pulumi/esc-sdk",
3
- "version": "v0.12.4",
3
+ "version": "v0.13.1",
4
4
  "description": "NodeJS SDK for Pulumi ESC",
5
5
  "keywords": [
6
6
  "pulumi",