@aws-sdk/client-sqs 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.
@@ -23,6 +23,7 @@ const getRuntimeConfig = (config) => {
23
23
  const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
24
24
  const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
25
25
  (0, core_1.emitWarningIfUnsupportedVersion)(process.version);
26
+ const profileConfig = { profile: config?.profile };
26
27
  return {
27
28
  ...clientSharedValues,
28
29
  ...config,
@@ -32,20 +33,21 @@ const getRuntimeConfig = (config) => {
32
33
  credentialDefaultProvider: config?.credentialDefaultProvider ?? credential_provider_node_1.defaultProvider,
33
34
  defaultUserAgentProvider: config?.defaultUserAgentProvider ??
34
35
  (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
35
- maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
36
+ maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
36
37
  md5: config?.md5 ?? hash_node_1.Hash.bind(null, "md5"),
37
- region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS),
38
+ region: config?.region ??
39
+ (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...profileConfig }),
38
40
  requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
39
41
  retryMode: config?.retryMode ??
40
42
  (0, node_config_provider_1.loadConfig)({
41
43
  ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
42
44
  default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE,
43
- }),
45
+ }, config),
44
46
  sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"),
45
47
  streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
46
- useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
47
- useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),
48
- userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS),
48
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, profileConfig),
49
+ useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, profileConfig),
50
+ userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, profileConfig),
49
51
  };
50
52
  };
51
53
  exports.getRuntimeConfig = getRuntimeConfig;
@@ -19,6 +19,7 @@ export const getRuntimeConfig = (config) => {
19
19
  const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
20
20
  const clientSharedValues = getSharedRuntimeConfig(config);
21
21
  awsCheckVersion(process.version);
22
+ const profileConfig = { profile: config?.profile };
22
23
  return {
23
24
  ...clientSharedValues,
24
25
  ...config,
@@ -28,19 +29,20 @@ export const getRuntimeConfig = (config) => {
28
29
  credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider,
29
30
  defaultUserAgentProvider: config?.defaultUserAgentProvider ??
30
31
  createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
31
- maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
32
+ maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
32
33
  md5: config?.md5 ?? Hash.bind(null, "md5"),
33
- region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS),
34
+ region: config?.region ??
35
+ loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...profileConfig }),
34
36
  requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
35
37
  retryMode: config?.retryMode ??
36
38
  loadNodeConfig({
37
39
  ...NODE_RETRY_MODE_CONFIG_OPTIONS,
38
40
  default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
39
- }),
41
+ }, config),
40
42
  sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
41
43
  streamCollector: config?.streamCollector ?? streamCollector,
42
- useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
43
- useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),
44
- userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS),
44
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, profileConfig),
45
+ useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, profileConfig),
46
+ userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, profileConfig),
45
47
  };
46
48
  };
@@ -118,6 +118,24 @@ export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHand
118
118
  * The AWS region to which this client will send requests
119
119
  */
120
120
  region?: string | __Provider<string>;
121
+ /**
122
+ * Setting a client profile is similar to setting a value for the
123
+ * AWS_PROFILE environment variable. Setting a profile on a client
124
+ * in code only affects the single client instance, unlike AWS_PROFILE.
125
+ *
126
+ * When set, and only for environments where an AWS configuration
127
+ * file exists, fields configurable by this file will be retrieved
128
+ * from the specified profile within that file.
129
+ * Conflicting code configuration and environment variables will
130
+ * still have higher priority.
131
+ *
132
+ * For client credential resolution that involves checking the AWS
133
+ * configuration file, the client's profile (this value) will be
134
+ * used unless a different profile is set in the credential
135
+ * provider options.
136
+ *
137
+ */
138
+ profile?: string;
121
139
  /**
122
140
  * The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header
123
141
  * @internal
@@ -27,6 +27,7 @@ export declare const getRuntimeConfig: (config: SQSClientConfig) => {
27
27
  utf8Encoder: (input: string | Uint8Array) => string;
28
28
  disableHostPrefix: boolean;
29
29
  serviceId: string;
30
+ profile?: string | undefined;
30
31
  logger: import("@smithy/types").Logger;
31
32
  extensions: import("./runtimeExtensions").RuntimeExtension[];
32
33
  customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
@@ -29,6 +29,7 @@ export declare const getRuntimeConfig: (config: SQSClientConfig) => {
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: SQSClientConfig) => {
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
  md5: false | import("@smithy/types").HashConstructor;
@@ -213,6 +213,7 @@ export interface ClientDefaults
213
213
  useDualstackEndpoint?: boolean | __Provider<boolean>;
214
214
  useFipsEndpoint?: boolean | __Provider<boolean>;
215
215
  region?: string | __Provider<string>;
216
+ profile?: string;
216
217
  defaultUserAgentProvider?: Provider<__UserAgent>;
217
218
  credentialDefaultProvider?: (input: any) => AwsCredentialIdentityProvider;
218
219
  md5?: __ChecksumConstructor | __HashConstructor | false;
@@ -34,6 +34,7 @@ export declare const getRuntimeConfig: (config: SQSClientConfig) => {
34
34
  utf8Encoder: (input: string | Uint8Array) => string;
35
35
  disableHostPrefix: boolean;
36
36
  serviceId: string;
37
+ profile?: string | undefined;
37
38
  logger: import("@smithy/types").Logger;
38
39
  extensions: import("./runtimeExtensions").RuntimeExtension[];
39
40
  customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
@@ -40,6 +40,7 @@ export declare const getRuntimeConfig: (config: SQSClientConfig) => {
40
40
  utf8Encoder: (input: string | Uint8Array) => string;
41
41
  disableHostPrefix: boolean;
42
42
  serviceId: string;
43
+ profile?: string | undefined;
43
44
  logger: import("@smithy/types").Logger;
44
45
  extensions: import("./runtimeExtensions").RuntimeExtension[];
45
46
  customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
@@ -22,6 +22,7 @@ export declare const getRuntimeConfig: (config: SQSClientConfig) => {
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-sqs",
3
3
  "description": "AWS SDK for JavaScript Sqs 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-sqs",
@@ -20,20 +20,20 @@
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-sdk-sqs": "3.709.0",
31
- "@aws-sdk/middleware-user-agent": "3.709.0",
32
- "@aws-sdk/region-config-resolver": "3.709.0",
33
- "@aws-sdk/types": "3.709.0",
34
- "@aws-sdk/util-endpoints": "3.709.0",
35
- "@aws-sdk/util-user-agent-browser": "3.709.0",
36
- "@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-sdk-sqs": "3.714.0",
31
+ "@aws-sdk/middleware-user-agent": "3.714.0",
32
+ "@aws-sdk/region-config-resolver": "3.714.0",
33
+ "@aws-sdk/types": "3.714.0",
34
+ "@aws-sdk/util-endpoints": "3.714.0",
35
+ "@aws-sdk/util-user-agent-browser": "3.714.0",
36
+ "@aws-sdk/util-user-agent-node": "3.714.0",
37
37
  "@smithy/config-resolver": "^3.0.13",
38
38
  "@smithy/core": "^2.5.5",
39
39
  "@smithy/fetch-http-handler": "^4.1.2",