@aws-sdk/client-cloudwatch 3.712.0 → 3.714.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.
@@ -24,6 +24,7 @@ const getRuntimeConfig = (config) => {
24
24
  const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
25
25
  const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
26
26
  (0, core_1.emitWarningIfUnsupportedVersion)(process.version);
27
+ const profileConfig = { profile: config?.profile };
27
28
  return {
28
29
  ...clientSharedValues,
29
30
  ...config,
@@ -33,21 +34,23 @@ const getRuntimeConfig = (config) => {
33
34
  credentialDefaultProvider: config?.credentialDefaultProvider ?? credential_provider_node_1.defaultProvider,
34
35
  defaultUserAgentProvider: config?.defaultUserAgentProvider ??
35
36
  (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
36
- disableRequestCompression: config?.disableRequestCompression ?? (0, node_config_provider_1.loadConfig)(middleware_compression_1.NODE_DISABLE_REQUEST_COMPRESSION_CONFIG_OPTIONS),
37
- maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
38
- region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS),
37
+ disableRequestCompression: config?.disableRequestCompression ?? (0, node_config_provider_1.loadConfig)(middleware_compression_1.NODE_DISABLE_REQUEST_COMPRESSION_CONFIG_OPTIONS, config),
38
+ maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
39
+ region: config?.region ??
40
+ (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...profileConfig }),
39
41
  requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
40
- requestMinCompressionSizeBytes: config?.requestMinCompressionSizeBytes ?? (0, node_config_provider_1.loadConfig)(middleware_compression_1.NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES_CONFIG_OPTIONS),
42
+ requestMinCompressionSizeBytes: config?.requestMinCompressionSizeBytes ??
43
+ (0, node_config_provider_1.loadConfig)(middleware_compression_1.NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES_CONFIG_OPTIONS, config),
41
44
  retryMode: config?.retryMode ??
42
45
  (0, node_config_provider_1.loadConfig)({
43
46
  ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
44
47
  default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE,
45
- }),
48
+ }, config),
46
49
  sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"),
47
50
  streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
48
- useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
49
- useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),
50
- userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS),
51
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, profileConfig),
52
+ useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, profileConfig),
53
+ userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, profileConfig),
51
54
  };
52
55
  };
53
56
  exports.getRuntimeConfig = getRuntimeConfig;
@@ -20,6 +20,7 @@ export const getRuntimeConfig = (config) => {
20
20
  const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
21
21
  const clientSharedValues = getSharedRuntimeConfig(config);
22
22
  awsCheckVersion(process.version);
23
+ const profileConfig = { profile: config?.profile };
23
24
  return {
24
25
  ...clientSharedValues,
25
26
  ...config,
@@ -29,20 +30,22 @@ export const getRuntimeConfig = (config) => {
29
30
  credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider,
30
31
  defaultUserAgentProvider: config?.defaultUserAgentProvider ??
31
32
  createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
32
- disableRequestCompression: config?.disableRequestCompression ?? loadNodeConfig(NODE_DISABLE_REQUEST_COMPRESSION_CONFIG_OPTIONS),
33
- maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
34
- region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS),
33
+ disableRequestCompression: config?.disableRequestCompression ?? loadNodeConfig(NODE_DISABLE_REQUEST_COMPRESSION_CONFIG_OPTIONS, config),
34
+ maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
35
+ region: config?.region ??
36
+ loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...profileConfig }),
35
37
  requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
36
- requestMinCompressionSizeBytes: config?.requestMinCompressionSizeBytes ?? loadNodeConfig(NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES_CONFIG_OPTIONS),
38
+ requestMinCompressionSizeBytes: config?.requestMinCompressionSizeBytes ??
39
+ loadNodeConfig(NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES_CONFIG_OPTIONS, config),
37
40
  retryMode: config?.retryMode ??
38
41
  loadNodeConfig({
39
42
  ...NODE_RETRY_MODE_CONFIG_OPTIONS,
40
43
  default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
41
- }),
44
+ }, config),
42
45
  sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
43
46
  streamCollector: config?.streamCollector ?? streamCollector,
44
- useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
45
- useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),
46
- userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS),
47
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, profileConfig),
48
+ useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, profileConfig),
49
+ userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, profileConfig),
47
50
  };
48
51
  };
@@ -133,6 +133,24 @@ export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHand
133
133
  * The AWS region to which this client will send requests
134
134
  */
135
135
  region?: string | __Provider<string>;
136
+ /**
137
+ * Setting a client profile is similar to setting a value for the
138
+ * AWS_PROFILE environment variable. Setting a profile on a client
139
+ * in code only affects the single client instance, unlike AWS_PROFILE.
140
+ *
141
+ * When set, and only for environments where an AWS configuration
142
+ * file exists, fields configurable by this file will be retrieved
143
+ * from the specified profile within that file.
144
+ * Conflicting code configuration and environment variables will
145
+ * still have higher priority.
146
+ *
147
+ * For client credential resolution that involves checking the AWS
148
+ * configuration file, the client's profile (this value) will be
149
+ * used unless a different profile is set in the credential
150
+ * provider options.
151
+ *
152
+ */
153
+ profile?: string;
136
154
  /**
137
155
  * The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header
138
156
  * @internal
@@ -28,6 +28,7 @@ export declare const getRuntimeConfig: (config: CloudWatchClientConfig) => {
28
28
  utf8Encoder: (input: string | Uint8Array) => string;
29
29
  disableHostPrefix: boolean;
30
30
  serviceId: string;
31
+ profile?: string | undefined;
31
32
  logger: import("@smithy/types").Logger;
32
33
  extensions: import("./runtimeExtensions").RuntimeExtension[];
33
34
  customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
@@ -29,6 +29,7 @@ export declare const getRuntimeConfig: (config: CloudWatchClientConfig) => {
29
29
  utf8Encoder: (input: string | Uint8Array) => string;
30
30
  disableHostPrefix: boolean;
31
31
  serviceId: string;
32
+ profile?: string | undefined;
32
33
  logger: import("@smithy/types").Logger;
33
34
  extensions: import("./runtimeExtensions").RuntimeExtension[];
34
35
  customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
@@ -20,6 +20,7 @@ export declare const getRuntimeConfig: (config: CloudWatchClientConfig) => {
20
20
  useDualstackEndpoint: boolean | import("@smithy/types").Provider<boolean>;
21
21
  useFipsEndpoint: boolean | import("@smithy/types").Provider<boolean>;
22
22
  region: string | import("@smithy/types").Provider<any>;
23
+ profile?: string | undefined;
23
24
  defaultUserAgentProvider: (config?: import("@aws-sdk/util-user-agent-browser").PreviouslyResolved | undefined) => Promise<import("@smithy/types").UserAgent>;
24
25
  credentialDefaultProvider: (input: any) => import("@smithy/types").AwsCredentialIdentityProvider;
25
26
  maxAttempts: number | import("@smithy/types").Provider<number>;
@@ -303,6 +303,7 @@ export interface ClientDefaults
303
303
  useDualstackEndpoint?: boolean | __Provider<boolean>;
304
304
  useFipsEndpoint?: boolean | __Provider<boolean>;
305
305
  region?: string | __Provider<string>;
306
+ profile?: string;
306
307
  defaultUserAgentProvider?: Provider<__UserAgent>;
307
308
  credentialDefaultProvider?: (input: any) => AwsCredentialIdentityProvider;
308
309
  maxAttempts?: number | __Provider<number>;
@@ -39,6 +39,7 @@ export declare const getRuntimeConfig: (config: CloudWatchClientConfig) => {
39
39
  utf8Encoder: (input: string | Uint8Array) => string;
40
40
  disableHostPrefix: boolean;
41
41
  serviceId: string;
42
+ profile?: string | undefined;
42
43
  logger: import("@smithy/types").Logger;
43
44
  extensions: import("./runtimeExtensions").RuntimeExtension[];
44
45
  customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
@@ -44,6 +44,7 @@ export declare const getRuntimeConfig: (config: CloudWatchClientConfig) => {
44
44
  utf8Encoder: (input: string | Uint8Array) => string;
45
45
  disableHostPrefix: boolean;
46
46
  serviceId: string;
47
+ profile?: string | undefined;
47
48
  logger: import("@smithy/types").Logger;
48
49
  extensions: import("./runtimeExtensions").RuntimeExtension[];
49
50
  customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
@@ -22,6 +22,7 @@ export declare const getRuntimeConfig: (config: CloudWatchClientConfig) => {
22
22
  useDualstackEndpoint: boolean | import("@smithy/types").Provider<boolean>;
23
23
  useFipsEndpoint: boolean | import("@smithy/types").Provider<boolean>;
24
24
  region: string | import("@smithy/types").Provider<any>;
25
+ profile?: string | undefined;
25
26
  defaultUserAgentProvider: (
26
27
  config?:
27
28
  | import("@aws-sdk/util-user-agent-browser").PreviouslyResolved
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-cloudwatch",
3
3
  "description": "AWS SDK for JavaScript Cloudwatch Client for Node.js, Browser and React Native",
4
- "version": "3.712.0",
4
+ "version": "3.714.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "node ../../scripts/compilation/inline client-cloudwatch",
@@ -20,19 +20,19 @@
20
20
  "dependencies": {
21
21
  "@aws-crypto/sha256-browser": "5.2.0",
22
22
  "@aws-crypto/sha256-js": "5.2.0",
23
- "@aws-sdk/client-sso-oidc": "3.712.0",
24
- "@aws-sdk/client-sts": "3.712.0",
25
- "@aws-sdk/core": "3.709.0",
26
- "@aws-sdk/credential-provider-node": "3.712.0",
27
- "@aws-sdk/middleware-host-header": "3.709.0",
28
- "@aws-sdk/middleware-logger": "3.709.0",
29
- "@aws-sdk/middleware-recursion-detection": "3.709.0",
30
- "@aws-sdk/middleware-user-agent": "3.709.0",
31
- "@aws-sdk/region-config-resolver": "3.709.0",
32
- "@aws-sdk/types": "3.709.0",
33
- "@aws-sdk/util-endpoints": "3.709.0",
34
- "@aws-sdk/util-user-agent-browser": "3.709.0",
35
- "@aws-sdk/util-user-agent-node": "3.712.0",
23
+ "@aws-sdk/client-sso-oidc": "3.714.0",
24
+ "@aws-sdk/client-sts": "3.714.0",
25
+ "@aws-sdk/core": "3.714.0",
26
+ "@aws-sdk/credential-provider-node": "3.714.0",
27
+ "@aws-sdk/middleware-host-header": "3.714.0",
28
+ "@aws-sdk/middleware-logger": "3.714.0",
29
+ "@aws-sdk/middleware-recursion-detection": "3.714.0",
30
+ "@aws-sdk/middleware-user-agent": "3.714.0",
31
+ "@aws-sdk/region-config-resolver": "3.714.0",
32
+ "@aws-sdk/types": "3.714.0",
33
+ "@aws-sdk/util-endpoints": "3.714.0",
34
+ "@aws-sdk/util-user-agent-browser": "3.714.0",
35
+ "@aws-sdk/util-user-agent-node": "3.714.0",
36
36
  "@smithy/config-resolver": "^3.0.13",
37
37
  "@smithy/core": "^2.5.5",
38
38
  "@smithy/fetch-http-handler": "^4.1.2",