@aws-sdk/client-sustainability 3.1021.0
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/LICENSE +201 -0
- package/README.md +195 -0
- package/dist-cjs/auth/httpAuthSchemeProvider.js +126 -0
- package/dist-cjs/endpoint/endpointResolver.js +18 -0
- package/dist-cjs/endpoint/ruleset.js +7 -0
- package/dist-cjs/index.js +212 -0
- package/dist-cjs/models/SustainabilityServiceException.js +12 -0
- package/dist-cjs/models/errors.js +66 -0
- package/dist-cjs/runtimeConfig.browser.js +38 -0
- package/dist-cjs/runtimeConfig.js +55 -0
- package/dist-cjs/runtimeConfig.native.js +15 -0
- package/dist-cjs/runtimeConfig.shared.js +50 -0
- package/dist-cjs/schemas/schemas_0.js +157 -0
- package/dist-es/Sustainability.js +17 -0
- package/dist-es/SustainabilityClient.js +51 -0
- package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
- package/dist-es/auth/httpAuthSchemeProvider.js +122 -0
- package/dist-es/commands/GetEstimatedCarbonEmissionsCommand.js +16 -0
- package/dist-es/commands/GetEstimatedCarbonEmissionsDimensionValuesCommand.js +16 -0
- package/dist-es/commands/index.js +2 -0
- package/dist-es/endpoint/EndpointParameters.js +11 -0
- package/dist-es/endpoint/endpointResolver.js +14 -0
- package/dist-es/endpoint/ruleset.js +4 -0
- package/dist-es/extensionConfiguration.js +1 -0
- package/dist-es/index.js +9 -0
- package/dist-es/models/SustainabilityServiceException.js +8 -0
- package/dist-es/models/enums.js +24 -0
- package/dist-es/models/errors.js +59 -0
- package/dist-es/models/models_0.js +1 -0
- package/dist-es/pagination/GetEstimatedCarbonEmissionsDimensionValuesPaginator.js +4 -0
- package/dist-es/pagination/GetEstimatedCarbonEmissionsPaginator.js +4 -0
- package/dist-es/pagination/Interfaces.js +1 -0
- package/dist-es/pagination/index.js +3 -0
- package/dist-es/runtimeConfig.browser.js +33 -0
- package/dist-es/runtimeConfig.js +50 -0
- package/dist-es/runtimeConfig.native.js +11 -0
- package/dist-es/runtimeConfig.shared.js +46 -0
- package/dist-es/runtimeExtensions.js +9 -0
- package/dist-es/schemas/schemas_0.js +154 -0
- package/dist-types/Sustainability.d.ts +38 -0
- package/dist-types/SustainabilityClient.d.ts +189 -0
- package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
- package/dist-types/auth/httpAuthSchemeProvider.d.ts +83 -0
- package/dist-types/commands/GetEstimatedCarbonEmissionsCommand.d.ts +198 -0
- package/dist-types/commands/GetEstimatedCarbonEmissionsDimensionValuesCommand.d.ts +152 -0
- package/dist-types/commands/index.d.ts +2 -0
- package/dist-types/endpoint/EndpointParameters.d.ts +44 -0
- package/dist-types/endpoint/endpointResolver.d.ts +8 -0
- package/dist-types/endpoint/ruleset.d.ts +2 -0
- package/dist-types/extensionConfiguration.d.ts +9 -0
- package/dist-types/index.d.ts +17 -0
- package/dist-types/models/SustainabilityServiceException.d.ts +14 -0
- package/dist-types/models/enums.d.ts +104 -0
- package/dist-types/models/errors.d.ts +56 -0
- package/dist-types/models/models_0.d.ts +197 -0
- package/dist-types/pagination/GetEstimatedCarbonEmissionsDimensionValuesPaginator.d.ts +7 -0
- package/dist-types/pagination/GetEstimatedCarbonEmissionsPaginator.d.ts +7 -0
- package/dist-types/pagination/Interfaces.d.ts +8 -0
- package/dist-types/pagination/index.d.ts +3 -0
- package/dist-types/runtimeConfig.browser.d.ts +56 -0
- package/dist-types/runtimeConfig.d.ts +56 -0
- package/dist-types/runtimeConfig.native.d.ts +55 -0
- package/dist-types/runtimeConfig.shared.d.ts +29 -0
- package/dist-types/runtimeExtensions.d.ts +17 -0
- package/dist-types/schemas/schemas_0.d.ts +25 -0
- package/dist-types/ts3.4/Sustainability.d.ts +65 -0
- package/dist-types/ts3.4/SustainabilityClient.d.ts +131 -0
- package/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts +32 -0
- package/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +59 -0
- package/dist-types/ts3.4/commands/GetEstimatedCarbonEmissionsCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/GetEstimatedCarbonEmissionsDimensionValuesCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/index.d.ts +2 -0
- package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +45 -0
- package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
- package/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -0
- package/dist-types/ts3.4/extensionConfiguration.d.ts +9 -0
- package/dist-types/ts3.4/index.d.ts +12 -0
- package/dist-types/ts3.4/models/SustainabilityServiceException.d.ts +9 -0
- package/dist-types/ts3.4/models/enums.d.ts +29 -0
- package/dist-types/ts3.4/models/errors.d.ts +36 -0
- package/dist-types/ts3.4/models/models_0.d.ts +54 -0
- package/dist-types/ts3.4/pagination/GetEstimatedCarbonEmissionsDimensionValuesPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/GetEstimatedCarbonEmissionsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
- package/dist-types/ts3.4/pagination/index.d.ts +3 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +106 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +100 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +110 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +37 -0
- package/dist-types/ts3.4/runtimeExtensions.d.ts +11 -0
- package/dist-types/ts3.4/schemas/schemas_0.d.ts +24 -0
- package/package.json +101 -0
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
const _ADE = "AccessDeniedException";
|
|
2
|
+
const _D = "Dimension";
|
|
3
|
+
const _DE = "DimensionEntry";
|
|
4
|
+
const _DEL = "DimensionEntryList";
|
|
5
|
+
const _DLM = "DimensionListMap";
|
|
6
|
+
const _DV = "DimensionsValues";
|
|
7
|
+
const _Di = "Dimensions";
|
|
8
|
+
const _E = "Emissions";
|
|
9
|
+
const _ECE = "EstimatedCarbonEmissions";
|
|
10
|
+
const _ECEL = "EstimatedCarbonEmissionsList";
|
|
11
|
+
const _EM = "EmissionsMap";
|
|
12
|
+
const _ET = "EmissionsTypes";
|
|
13
|
+
const _EV = "EmissionsValues";
|
|
14
|
+
const _En = "End";
|
|
15
|
+
const _FB = "FilterBy";
|
|
16
|
+
const _FE = "FilterExpression";
|
|
17
|
+
const _FYSM = "FiscalYearStartMonth";
|
|
18
|
+
const _G = "Granularity";
|
|
19
|
+
const _GB = "GroupBy";
|
|
20
|
+
const _GC = "GranularityConfiguration";
|
|
21
|
+
const _GECE = "GetEstimatedCarbonEmissions";
|
|
22
|
+
const _GECEDV = "GetEstimatedCarbonEmissionsDimensionValues";
|
|
23
|
+
const _GECEDVR = "GetEstimatedCarbonEmissionsDimensionValuesRequest";
|
|
24
|
+
const _GECEDVRe = "GetEstimatedCarbonEmissionsDimensionValuesResponse";
|
|
25
|
+
const _GECER = "GetEstimatedCarbonEmissionsRequest";
|
|
26
|
+
const _GECERe = "GetEstimatedCarbonEmissionsResponse";
|
|
27
|
+
const _ISE = "InternalServerException";
|
|
28
|
+
const _M = "Message";
|
|
29
|
+
const _MR = "MaxResults";
|
|
30
|
+
const _MV = "ModelVersion";
|
|
31
|
+
const _NT = "NextToken";
|
|
32
|
+
const _R = "Results";
|
|
33
|
+
const _S = "Start";
|
|
34
|
+
const _TE = "ThrottlingException";
|
|
35
|
+
const _TP = "TimePeriod";
|
|
36
|
+
const _U = "Unit";
|
|
37
|
+
const _V = "Value";
|
|
38
|
+
const _VE = "ValidationException";
|
|
39
|
+
const _c = "client";
|
|
40
|
+
const _e = "error";
|
|
41
|
+
const _h = "http";
|
|
42
|
+
const _hE = "httpError";
|
|
43
|
+
const _jN = "jsonName";
|
|
44
|
+
const _m = "message";
|
|
45
|
+
const _s = "smithy.ts.sdk.synthetic.com.amazonaws.sustainability";
|
|
46
|
+
const _se = "server";
|
|
47
|
+
const n0 = "com.amazonaws.sustainability";
|
|
48
|
+
import { TypeRegistry } from "@smithy/core/schema";
|
|
49
|
+
import { AccessDeniedException, InternalServerException, ThrottlingException, ValidationException, } from "../models/errors";
|
|
50
|
+
import { SustainabilityServiceException } from "../models/SustainabilityServiceException";
|
|
51
|
+
const _s_registry = TypeRegistry.for(_s);
|
|
52
|
+
export var SustainabilityServiceException$ = [-3, _s, "SustainabilityServiceException", 0, [], []];
|
|
53
|
+
_s_registry.registerError(SustainabilityServiceException$, SustainabilityServiceException);
|
|
54
|
+
const n0_registry = TypeRegistry.for(n0);
|
|
55
|
+
export var AccessDeniedException$ = [-3, n0, _ADE,
|
|
56
|
+
{ [_e]: _c, [_hE]: 403 },
|
|
57
|
+
[_M],
|
|
58
|
+
[[0, { [_jN]: _m }]], 1
|
|
59
|
+
];
|
|
60
|
+
n0_registry.registerError(AccessDeniedException$, AccessDeniedException);
|
|
61
|
+
export var InternalServerException$ = [-3, n0, _ISE,
|
|
62
|
+
{ [_e]: _se, [_hE]: 500 },
|
|
63
|
+
[_M],
|
|
64
|
+
[[0, { [_jN]: _m }]], 1
|
|
65
|
+
];
|
|
66
|
+
n0_registry.registerError(InternalServerException$, InternalServerException);
|
|
67
|
+
export var ThrottlingException$ = [-3, n0, _TE,
|
|
68
|
+
{ [_e]: _c, [_hE]: 429 },
|
|
69
|
+
[_M],
|
|
70
|
+
[[0, { [_jN]: _m }]], 1
|
|
71
|
+
];
|
|
72
|
+
n0_registry.registerError(ThrottlingException$, ThrottlingException);
|
|
73
|
+
export var ValidationException$ = [-3, n0, _VE,
|
|
74
|
+
{ [_e]: _c, [_hE]: 400 },
|
|
75
|
+
[_M],
|
|
76
|
+
[[0, { [_jN]: _m }]], 1
|
|
77
|
+
];
|
|
78
|
+
n0_registry.registerError(ValidationException$, ValidationException);
|
|
79
|
+
export const errorTypeRegistries = [
|
|
80
|
+
_s_registry,
|
|
81
|
+
n0_registry,
|
|
82
|
+
];
|
|
83
|
+
export var DimensionEntry$ = [3, n0, _DE,
|
|
84
|
+
0,
|
|
85
|
+
[_D, _V],
|
|
86
|
+
[0, 0], 2
|
|
87
|
+
];
|
|
88
|
+
export var Emissions$ = [3, n0, _E,
|
|
89
|
+
0,
|
|
90
|
+
[_V, _U],
|
|
91
|
+
[1, 0], 2
|
|
92
|
+
];
|
|
93
|
+
export var EstimatedCarbonEmissions$ = [3, n0, _ECE,
|
|
94
|
+
0,
|
|
95
|
+
[_TP, _DV, _MV, _EV],
|
|
96
|
+
[() => TimePeriod$, 128 | 0, 0, () => EmissionsMap], 4
|
|
97
|
+
];
|
|
98
|
+
export var FilterExpression$ = [3, n0, _FE,
|
|
99
|
+
0,
|
|
100
|
+
[_Di],
|
|
101
|
+
[[2, n0, _DLM, 0, 0, 64 | 0]]
|
|
102
|
+
];
|
|
103
|
+
export var GetEstimatedCarbonEmissionsDimensionValuesRequest$ = [3, n0, _GECEDVR,
|
|
104
|
+
0,
|
|
105
|
+
[_TP, _Di, _MR, _NT],
|
|
106
|
+
[() => TimePeriod$, 64 | 0, 1, 0], 2
|
|
107
|
+
];
|
|
108
|
+
export var GetEstimatedCarbonEmissionsDimensionValuesResponse$ = [3, n0, _GECEDVRe,
|
|
109
|
+
0,
|
|
110
|
+
[_R, _NT],
|
|
111
|
+
[() => DimensionEntryList, 0]
|
|
112
|
+
];
|
|
113
|
+
export var GetEstimatedCarbonEmissionsRequest$ = [3, n0, _GECER,
|
|
114
|
+
0,
|
|
115
|
+
[_TP, _GB, _FB, _ET, _G, _GC, _MR, _NT],
|
|
116
|
+
[() => TimePeriod$, 64 | 0, () => FilterExpression$, 64 | 0, 0, () => GranularityConfiguration$, 1, 0], 1
|
|
117
|
+
];
|
|
118
|
+
export var GetEstimatedCarbonEmissionsResponse$ = [3, n0, _GECERe,
|
|
119
|
+
0,
|
|
120
|
+
[_R, _NT],
|
|
121
|
+
[() => EstimatedCarbonEmissionsList, 0], 1
|
|
122
|
+
];
|
|
123
|
+
export var GranularityConfiguration$ = [3, n0, _GC,
|
|
124
|
+
0,
|
|
125
|
+
[_FYSM],
|
|
126
|
+
[1]
|
|
127
|
+
];
|
|
128
|
+
export var TimePeriod$ = [3, n0, _TP,
|
|
129
|
+
0,
|
|
130
|
+
[_S, _En],
|
|
131
|
+
[5, 5], 2
|
|
132
|
+
];
|
|
133
|
+
var DimensionEntryList = [1, n0, _DEL,
|
|
134
|
+
0, () => DimensionEntry$
|
|
135
|
+
];
|
|
136
|
+
var DimensionList = 64 | 0;
|
|
137
|
+
var DimensionValueList = 64 | 0;
|
|
138
|
+
var EmissionsTypeList = 64 | 0;
|
|
139
|
+
var EstimatedCarbonEmissionsList = [1, n0, _ECEL,
|
|
140
|
+
0, () => EstimatedCarbonEmissions$
|
|
141
|
+
];
|
|
142
|
+
var DimensionListMap = [2, n0, _DLM,
|
|
143
|
+
0, 0, 64 | 0
|
|
144
|
+
];
|
|
145
|
+
var DimensionsMap = 128 | 0;
|
|
146
|
+
var EmissionsMap = [2, n0, _EM,
|
|
147
|
+
0, 0, () => Emissions$
|
|
148
|
+
];
|
|
149
|
+
export var GetEstimatedCarbonEmissions$ = [9, n0, _GECE,
|
|
150
|
+
{ [_h]: ["POST", "/v1/estimated-carbon-emissions", 200] }, () => GetEstimatedCarbonEmissionsRequest$, () => GetEstimatedCarbonEmissionsResponse$
|
|
151
|
+
];
|
|
152
|
+
export var GetEstimatedCarbonEmissionsDimensionValues$ = [9, n0, _GECEDV,
|
|
153
|
+
{ [_h]: ["POST", "/v1/estimated-carbon-emissions-dimension-values", 200] }, () => GetEstimatedCarbonEmissionsDimensionValuesRequest$, () => GetEstimatedCarbonEmissionsDimensionValuesResponse$
|
|
154
|
+
];
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { HttpHandlerOptions as __HttpHandlerOptions, PaginationConfiguration, Paginator } from "@smithy/types";
|
|
2
|
+
import { type GetEstimatedCarbonEmissionsCommandInput, type GetEstimatedCarbonEmissionsCommandOutput } from "./commands/GetEstimatedCarbonEmissionsCommand";
|
|
3
|
+
import { type GetEstimatedCarbonEmissionsDimensionValuesCommandInput, type GetEstimatedCarbonEmissionsDimensionValuesCommandOutput } from "./commands/GetEstimatedCarbonEmissionsDimensionValuesCommand";
|
|
4
|
+
import { SustainabilityClient } from "./SustainabilityClient";
|
|
5
|
+
export interface Sustainability {
|
|
6
|
+
/**
|
|
7
|
+
* @see {@link GetEstimatedCarbonEmissionsCommand}
|
|
8
|
+
*/
|
|
9
|
+
getEstimatedCarbonEmissions(args: GetEstimatedCarbonEmissionsCommandInput, options?: __HttpHandlerOptions): Promise<GetEstimatedCarbonEmissionsCommandOutput>;
|
|
10
|
+
getEstimatedCarbonEmissions(args: GetEstimatedCarbonEmissionsCommandInput, cb: (err: any, data?: GetEstimatedCarbonEmissionsCommandOutput) => void): void;
|
|
11
|
+
getEstimatedCarbonEmissions(args: GetEstimatedCarbonEmissionsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetEstimatedCarbonEmissionsCommandOutput) => void): void;
|
|
12
|
+
/**
|
|
13
|
+
* @see {@link GetEstimatedCarbonEmissionsDimensionValuesCommand}
|
|
14
|
+
*/
|
|
15
|
+
getEstimatedCarbonEmissionsDimensionValues(args: GetEstimatedCarbonEmissionsDimensionValuesCommandInput, options?: __HttpHandlerOptions): Promise<GetEstimatedCarbonEmissionsDimensionValuesCommandOutput>;
|
|
16
|
+
getEstimatedCarbonEmissionsDimensionValues(args: GetEstimatedCarbonEmissionsDimensionValuesCommandInput, cb: (err: any, data?: GetEstimatedCarbonEmissionsDimensionValuesCommandOutput) => void): void;
|
|
17
|
+
getEstimatedCarbonEmissionsDimensionValues(args: GetEstimatedCarbonEmissionsDimensionValuesCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetEstimatedCarbonEmissionsDimensionValuesCommandOutput) => void): void;
|
|
18
|
+
/**
|
|
19
|
+
* @see {@link GetEstimatedCarbonEmissionsCommand}
|
|
20
|
+
* @param args - command input.
|
|
21
|
+
* @param paginationConfig - optional pagination config.
|
|
22
|
+
* @returns AsyncIterable of {@link GetEstimatedCarbonEmissionsCommandOutput}.
|
|
23
|
+
*/
|
|
24
|
+
paginateGetEstimatedCarbonEmissions(args: GetEstimatedCarbonEmissionsCommandInput, paginationConfig?: Omit<PaginationConfiguration, "client">): Paginator<GetEstimatedCarbonEmissionsCommandOutput>;
|
|
25
|
+
/**
|
|
26
|
+
* @see {@link GetEstimatedCarbonEmissionsDimensionValuesCommand}
|
|
27
|
+
* @param args - command input.
|
|
28
|
+
* @param paginationConfig - optional pagination config.
|
|
29
|
+
* @returns AsyncIterable of {@link GetEstimatedCarbonEmissionsDimensionValuesCommandOutput}.
|
|
30
|
+
*/
|
|
31
|
+
paginateGetEstimatedCarbonEmissionsDimensionValues(args: GetEstimatedCarbonEmissionsDimensionValuesCommandInput, paginationConfig?: Omit<PaginationConfiguration, "client">): Paginator<GetEstimatedCarbonEmissionsDimensionValuesCommandOutput>;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* <p>The AWS Sustainability service provides programmatic access to estimated carbon emissions data for your Amazon Web Services usage. Use the AWS Sustainability service to retrieve, analyze, and track the carbon footprint of your cloud infrastructure over time. </p> <p>With the AWS Sustainability service, you can:</p> <ul> <li> <p>Retrieve estimated carbon emissions for your Amazon Web Services usage across different time periods </p> </li> <li> <p>Group emissions data by dimensions such as account, region, and service</p> </li> <li> <p>Filter emissions data to focus on specific accounts, regions, or services</p> </li> <li> <p>Access multiple emissions calculation methodologies including Location-based Method (LBM) and Market-based Method (MBM) </p> </li> <li> <p>Aggregate emissions data at various time granularities including monthly, quarterly, and yearly periods </p> </li> </ul> <p> The API supports pagination for efficient data retrieval and provides dimension values to help you understand the available grouping and filtering options for your account. </p> <p> All emissions values are calculated using methodologies aligned with the Greenhouse Gas (GHG) Protocol and are provided in metric tons of carbon dioxide-equivalent (MTCO2e). </p>
|
|
35
|
+
* @public
|
|
36
|
+
*/
|
|
37
|
+
export declare class Sustainability extends SustainabilityClient implements Sustainability {
|
|
38
|
+
}
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import { type HostHeaderInputConfig, type HostHeaderResolvedConfig } from "@aws-sdk/middleware-host-header";
|
|
2
|
+
import { type UserAgentInputConfig, type UserAgentResolvedConfig } from "@aws-sdk/middleware-user-agent";
|
|
3
|
+
import { type RegionInputConfig, type RegionResolvedConfig } from "@smithy/config-resolver";
|
|
4
|
+
import { type EndpointInputConfig, type EndpointResolvedConfig } from "@smithy/middleware-endpoint";
|
|
5
|
+
import { type RetryInputConfig, type RetryResolvedConfig } from "@smithy/middleware-retry";
|
|
6
|
+
import type { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http";
|
|
7
|
+
import { type DefaultsMode as __DefaultsMode, type SmithyConfiguration as __SmithyConfiguration, type SmithyResolvedConfiguration as __SmithyResolvedConfiguration, Client as __Client } from "@smithy/smithy-client";
|
|
8
|
+
import type { AwsCredentialIdentityProvider, BodyLengthCalculator as __BodyLengthCalculator, CheckOptionalClientConfig as __CheckOptionalClientConfig, ChecksumConstructor as __ChecksumConstructor, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@smithy/types";
|
|
9
|
+
import { type HttpAuthSchemeInputConfig, type HttpAuthSchemeResolvedConfig } from "./auth/httpAuthSchemeProvider";
|
|
10
|
+
import type { GetEstimatedCarbonEmissionsCommandInput, GetEstimatedCarbonEmissionsCommandOutput } from "./commands/GetEstimatedCarbonEmissionsCommand";
|
|
11
|
+
import type { GetEstimatedCarbonEmissionsDimensionValuesCommandInput, GetEstimatedCarbonEmissionsDimensionValuesCommandOutput } from "./commands/GetEstimatedCarbonEmissionsDimensionValuesCommand";
|
|
12
|
+
import { type ClientInputEndpointParameters, type ClientResolvedEndpointParameters, type EndpointParameters } from "./endpoint/EndpointParameters";
|
|
13
|
+
import { type RuntimeExtension, type RuntimeExtensionsConfig } from "./runtimeExtensions";
|
|
14
|
+
export { __Client };
|
|
15
|
+
/**
|
|
16
|
+
* @public
|
|
17
|
+
*/
|
|
18
|
+
export type ServiceInputTypes = GetEstimatedCarbonEmissionsCommandInput | GetEstimatedCarbonEmissionsDimensionValuesCommandInput;
|
|
19
|
+
/**
|
|
20
|
+
* @public
|
|
21
|
+
*/
|
|
22
|
+
export type ServiceOutputTypes = GetEstimatedCarbonEmissionsCommandOutput | GetEstimatedCarbonEmissionsDimensionValuesCommandOutput;
|
|
23
|
+
/**
|
|
24
|
+
* @public
|
|
25
|
+
*/
|
|
26
|
+
export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> {
|
|
27
|
+
/**
|
|
28
|
+
* The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs.
|
|
29
|
+
*/
|
|
30
|
+
requestHandler?: __HttpHandlerUserInput;
|
|
31
|
+
/**
|
|
32
|
+
* A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface
|
|
33
|
+
* that computes the SHA-256 HMAC or checksum of a string or binary buffer.
|
|
34
|
+
* @internal
|
|
35
|
+
*/
|
|
36
|
+
sha256?: __ChecksumConstructor | __HashConstructor;
|
|
37
|
+
/**
|
|
38
|
+
* The function that will be used to convert strings into HTTP endpoints.
|
|
39
|
+
* @internal
|
|
40
|
+
*/
|
|
41
|
+
urlParser?: __UrlParser;
|
|
42
|
+
/**
|
|
43
|
+
* A function that can calculate the length of a request body.
|
|
44
|
+
* @internal
|
|
45
|
+
*/
|
|
46
|
+
bodyLengthChecker?: __BodyLengthCalculator;
|
|
47
|
+
/**
|
|
48
|
+
* A function that converts a stream into an array of bytes.
|
|
49
|
+
* @internal
|
|
50
|
+
*/
|
|
51
|
+
streamCollector?: __StreamCollector;
|
|
52
|
+
/**
|
|
53
|
+
* The function that will be used to convert a base64-encoded string to a byte array.
|
|
54
|
+
* @internal
|
|
55
|
+
*/
|
|
56
|
+
base64Decoder?: __Decoder;
|
|
57
|
+
/**
|
|
58
|
+
* The function that will be used to convert binary data to a base64-encoded string.
|
|
59
|
+
* @internal
|
|
60
|
+
*/
|
|
61
|
+
base64Encoder?: __Encoder;
|
|
62
|
+
/**
|
|
63
|
+
* The function that will be used to convert a UTF8-encoded string to a byte array.
|
|
64
|
+
* @internal
|
|
65
|
+
*/
|
|
66
|
+
utf8Decoder?: __Decoder;
|
|
67
|
+
/**
|
|
68
|
+
* The function that will be used to convert binary data to a UTF-8 encoded string.
|
|
69
|
+
* @internal
|
|
70
|
+
*/
|
|
71
|
+
utf8Encoder?: __Encoder;
|
|
72
|
+
/**
|
|
73
|
+
* The runtime environment.
|
|
74
|
+
* @internal
|
|
75
|
+
*/
|
|
76
|
+
runtime?: string;
|
|
77
|
+
/**
|
|
78
|
+
* Disable dynamically changing the endpoint of the client based on the hostPrefix
|
|
79
|
+
* trait of an operation.
|
|
80
|
+
*/
|
|
81
|
+
disableHostPrefix?: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* Unique service identifier.
|
|
84
|
+
* @internal
|
|
85
|
+
*/
|
|
86
|
+
serviceId?: string;
|
|
87
|
+
/**
|
|
88
|
+
* Enables IPv6/IPv4 dualstack endpoint.
|
|
89
|
+
*/
|
|
90
|
+
useDualstackEndpoint?: boolean | __Provider<boolean>;
|
|
91
|
+
/**
|
|
92
|
+
* Enables FIPS compatible endpoints.
|
|
93
|
+
*/
|
|
94
|
+
useFipsEndpoint?: boolean | __Provider<boolean>;
|
|
95
|
+
/**
|
|
96
|
+
* The AWS region to which this client will send requests
|
|
97
|
+
*/
|
|
98
|
+
region?: string | __Provider<string>;
|
|
99
|
+
/**
|
|
100
|
+
* Setting a client profile is similar to setting a value for the
|
|
101
|
+
* AWS_PROFILE environment variable. Setting a profile on a client
|
|
102
|
+
* in code only affects the single client instance, unlike AWS_PROFILE.
|
|
103
|
+
*
|
|
104
|
+
* When set, and only for environments where an AWS configuration
|
|
105
|
+
* file exists, fields configurable by this file will be retrieved
|
|
106
|
+
* from the specified profile within that file.
|
|
107
|
+
* Conflicting code configuration and environment variables will
|
|
108
|
+
* still have higher priority.
|
|
109
|
+
*
|
|
110
|
+
* For client credential resolution that involves checking the AWS
|
|
111
|
+
* configuration file, the client's profile (this value) will be
|
|
112
|
+
* used unless a different profile is set in the credential
|
|
113
|
+
* provider options.
|
|
114
|
+
*
|
|
115
|
+
*/
|
|
116
|
+
profile?: string;
|
|
117
|
+
/**
|
|
118
|
+
* The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header
|
|
119
|
+
* @internal
|
|
120
|
+
*/
|
|
121
|
+
defaultUserAgentProvider?: __Provider<__UserAgent>;
|
|
122
|
+
/**
|
|
123
|
+
* Default credentials provider; Not available in browser runtime.
|
|
124
|
+
* @deprecated
|
|
125
|
+
* @internal
|
|
126
|
+
*/
|
|
127
|
+
credentialDefaultProvider?: (input: any) => AwsCredentialIdentityProvider;
|
|
128
|
+
/**
|
|
129
|
+
* Value for how many times a request will be made at most in case of retry.
|
|
130
|
+
*/
|
|
131
|
+
maxAttempts?: number | __Provider<number>;
|
|
132
|
+
/**
|
|
133
|
+
* Specifies which retry algorithm to use.
|
|
134
|
+
* @see https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-smithy-util-retry/Enum/RETRY_MODES/
|
|
135
|
+
*
|
|
136
|
+
*/
|
|
137
|
+
retryMode?: string | __Provider<string>;
|
|
138
|
+
/**
|
|
139
|
+
* Optional logger for logging debug/info/warn/error.
|
|
140
|
+
*/
|
|
141
|
+
logger?: __Logger;
|
|
142
|
+
/**
|
|
143
|
+
* Optional extensions
|
|
144
|
+
*/
|
|
145
|
+
extensions?: RuntimeExtension[];
|
|
146
|
+
/**
|
|
147
|
+
* The {@link @smithy/smithy-client#DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK.
|
|
148
|
+
*/
|
|
149
|
+
defaultsMode?: __DefaultsMode | __Provider<__DefaultsMode>;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* @public
|
|
153
|
+
*/
|
|
154
|
+
export type SustainabilityClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults & UserAgentInputConfig & RetryInputConfig & RegionInputConfig & HostHeaderInputConfig & EndpointInputConfig<EndpointParameters> & HttpAuthSchemeInputConfig & ClientInputEndpointParameters;
|
|
155
|
+
/**
|
|
156
|
+
* @public
|
|
157
|
+
*
|
|
158
|
+
* The configuration interface of SustainabilityClient class constructor that set the region, credentials and other options.
|
|
159
|
+
*/
|
|
160
|
+
export interface SustainabilityClientConfig extends SustainabilityClientConfigType {
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* @public
|
|
164
|
+
*/
|
|
165
|
+
export type SustainabilityClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required<ClientDefaults> & RuntimeExtensionsConfig & UserAgentResolvedConfig & RetryResolvedConfig & RegionResolvedConfig & HostHeaderResolvedConfig & EndpointResolvedConfig<EndpointParameters> & HttpAuthSchemeResolvedConfig & ClientResolvedEndpointParameters;
|
|
166
|
+
/**
|
|
167
|
+
* @public
|
|
168
|
+
*
|
|
169
|
+
* The resolved configuration interface of SustainabilityClient class. This is resolved and normalized from the {@link SustainabilityClientConfig | constructor configuration interface}.
|
|
170
|
+
*/
|
|
171
|
+
export interface SustainabilityClientResolvedConfig extends SustainabilityClientResolvedConfigType {
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* <p>The AWS Sustainability service provides programmatic access to estimated carbon emissions data for your Amazon Web Services usage. Use the AWS Sustainability service to retrieve, analyze, and track the carbon footprint of your cloud infrastructure over time. </p> <p>With the AWS Sustainability service, you can:</p> <ul> <li> <p>Retrieve estimated carbon emissions for your Amazon Web Services usage across different time periods </p> </li> <li> <p>Group emissions data by dimensions such as account, region, and service</p> </li> <li> <p>Filter emissions data to focus on specific accounts, regions, or services</p> </li> <li> <p>Access multiple emissions calculation methodologies including Location-based Method (LBM) and Market-based Method (MBM) </p> </li> <li> <p>Aggregate emissions data at various time granularities including monthly, quarterly, and yearly periods </p> </li> </ul> <p> The API supports pagination for efficient data retrieval and provides dimension values to help you understand the available grouping and filtering options for your account. </p> <p> All emissions values are calculated using methodologies aligned with the Greenhouse Gas (GHG) Protocol and are provided in metric tons of carbon dioxide-equivalent (MTCO2e). </p>
|
|
175
|
+
* @public
|
|
176
|
+
*/
|
|
177
|
+
export declare class SustainabilityClient extends __Client<__HttpHandlerOptions, ServiceInputTypes, ServiceOutputTypes, SustainabilityClientResolvedConfig> {
|
|
178
|
+
/**
|
|
179
|
+
* The resolved configuration of SustainabilityClient class. This is resolved and normalized from the {@link SustainabilityClientConfig | constructor configuration interface}.
|
|
180
|
+
*/
|
|
181
|
+
readonly config: SustainabilityClientResolvedConfig;
|
|
182
|
+
constructor(...[configuration]: __CheckOptionalClientConfig<SustainabilityClientConfig>);
|
|
183
|
+
/**
|
|
184
|
+
* Destroy underlying resources, like sockets. It's usually not necessary to do this.
|
|
185
|
+
* However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
|
|
186
|
+
* Otherwise, sockets might stay open for quite a long time before the server terminates them.
|
|
187
|
+
*/
|
|
188
|
+
destroy(): void;
|
|
189
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { AwsCredentialIdentity, AwsCredentialIdentityProvider, HttpAuthScheme } from "@smithy/types";
|
|
2
|
+
import type { SustainabilityHttpAuthSchemeProvider } from "./httpAuthSchemeProvider";
|
|
3
|
+
/**
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export interface HttpAuthExtensionConfiguration {
|
|
7
|
+
setHttpAuthScheme(httpAuthScheme: HttpAuthScheme): void;
|
|
8
|
+
httpAuthSchemes(): HttpAuthScheme[];
|
|
9
|
+
setHttpAuthSchemeProvider(httpAuthSchemeProvider: SustainabilityHttpAuthSchemeProvider): void;
|
|
10
|
+
httpAuthSchemeProvider(): SustainabilityHttpAuthSchemeProvider;
|
|
11
|
+
setCredentials(credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider): void;
|
|
12
|
+
credentials(): AwsCredentialIdentity | AwsCredentialIdentityProvider | undefined;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
export type HttpAuthRuntimeConfig = Partial<{
|
|
18
|
+
httpAuthSchemes: HttpAuthScheme[];
|
|
19
|
+
httpAuthSchemeProvider: SustainabilityHttpAuthSchemeProvider;
|
|
20
|
+
credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider;
|
|
21
|
+
}>;
|
|
22
|
+
/**
|
|
23
|
+
* @internal
|
|
24
|
+
*/
|
|
25
|
+
export declare const getHttpAuthExtensionConfiguration: (runtimeConfig: HttpAuthRuntimeConfig) => HttpAuthExtensionConfiguration;
|
|
26
|
+
/**
|
|
27
|
+
* @internal
|
|
28
|
+
*/
|
|
29
|
+
export declare const resolveHttpAuthRuntimeConfig: (config: HttpAuthExtensionConfiguration) => HttpAuthRuntimeConfig;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { AwsSdkSigV4AAuthInputConfig, AwsSdkSigV4AAuthResolvedConfig, AwsSdkSigV4APreviouslyResolved, AwsSdkSigV4AuthInputConfig, AwsSdkSigV4AuthResolvedConfig, AwsSdkSigV4PreviouslyResolved } from "@aws-sdk/core/httpAuthSchemes";
|
|
2
|
+
import type { HandlerExecutionContext, HttpAuthScheme, HttpAuthSchemeParameters, HttpAuthSchemeParametersProvider, HttpAuthSchemeProvider, Provider } from "@smithy/types";
|
|
3
|
+
import { EndpointParameters } from "../endpoint/EndpointParameters";
|
|
4
|
+
import { SustainabilityClientResolvedConfig } from "../SustainabilityClient";
|
|
5
|
+
/**
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
interface _SustainabilityHttpAuthSchemeParameters extends HttpAuthSchemeParameters {
|
|
9
|
+
region?: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* @internal
|
|
13
|
+
*/
|
|
14
|
+
export interface SustainabilityHttpAuthSchemeParameters extends _SustainabilityHttpAuthSchemeParameters, EndpointParameters {
|
|
15
|
+
region?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @internal
|
|
19
|
+
*/
|
|
20
|
+
export interface SustainabilityHttpAuthSchemeParametersProvider extends HttpAuthSchemeParametersProvider<SustainabilityClientResolvedConfig, HandlerExecutionContext, SustainabilityHttpAuthSchemeParameters, object> {
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* @internal
|
|
24
|
+
*/
|
|
25
|
+
export declare const defaultSustainabilityHttpAuthSchemeParametersProvider: SustainabilityHttpAuthSchemeParametersProvider;
|
|
26
|
+
/**
|
|
27
|
+
* @internal
|
|
28
|
+
*/
|
|
29
|
+
export interface SustainabilityHttpAuthSchemeProvider extends HttpAuthSchemeProvider<SustainabilityHttpAuthSchemeParameters> {
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* @internal
|
|
33
|
+
*/
|
|
34
|
+
export declare const defaultSustainabilityHttpAuthSchemeProvider: SustainabilityHttpAuthSchemeProvider;
|
|
35
|
+
/**
|
|
36
|
+
* @public
|
|
37
|
+
*/
|
|
38
|
+
export interface HttpAuthSchemeInputConfig extends AwsSdkSigV4AuthInputConfig, AwsSdkSigV4AAuthInputConfig {
|
|
39
|
+
/**
|
|
40
|
+
* A comma-separated list of case-sensitive auth scheme names.
|
|
41
|
+
* An auth scheme name is a fully qualified auth scheme ID with the namespace prefix trimmed.
|
|
42
|
+
* For example, the auth scheme with ID aws.auth#sigv4 is named sigv4.
|
|
43
|
+
* @public
|
|
44
|
+
*/
|
|
45
|
+
authSchemePreference?: string[] | Provider<string[]>;
|
|
46
|
+
/**
|
|
47
|
+
* Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme.
|
|
48
|
+
* @internal
|
|
49
|
+
*/
|
|
50
|
+
httpAuthSchemes?: HttpAuthScheme[];
|
|
51
|
+
/**
|
|
52
|
+
* Configuration of an HttpAuthSchemeProvider for a client which resolves which HttpAuthScheme to use.
|
|
53
|
+
* @internal
|
|
54
|
+
*/
|
|
55
|
+
httpAuthSchemeProvider?: SustainabilityHttpAuthSchemeProvider;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* @internal
|
|
59
|
+
*/
|
|
60
|
+
export interface HttpAuthSchemeResolvedConfig extends AwsSdkSigV4AuthResolvedConfig, AwsSdkSigV4AAuthResolvedConfig {
|
|
61
|
+
/**
|
|
62
|
+
* A comma-separated list of case-sensitive auth scheme names.
|
|
63
|
+
* An auth scheme name is a fully qualified auth scheme ID with the namespace prefix trimmed.
|
|
64
|
+
* For example, the auth scheme with ID aws.auth#sigv4 is named sigv4.
|
|
65
|
+
* @public
|
|
66
|
+
*/
|
|
67
|
+
readonly authSchemePreference: Provider<string[]>;
|
|
68
|
+
/**
|
|
69
|
+
* Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme.
|
|
70
|
+
* @internal
|
|
71
|
+
*/
|
|
72
|
+
readonly httpAuthSchemes: HttpAuthScheme[];
|
|
73
|
+
/**
|
|
74
|
+
* Configuration of an HttpAuthSchemeProvider for a client which resolves which HttpAuthScheme to use.
|
|
75
|
+
* @internal
|
|
76
|
+
*/
|
|
77
|
+
readonly httpAuthSchemeProvider: SustainabilityHttpAuthSchemeProvider;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* @internal
|
|
81
|
+
*/
|
|
82
|
+
export declare const resolveHttpAuthSchemeConfig: <T>(config: T & HttpAuthSchemeInputConfig & AwsSdkSigV4PreviouslyResolved & AwsSdkSigV4APreviouslyResolved) => T & HttpAuthSchemeResolvedConfig;
|
|
83
|
+
export {};
|