svix 2.4.0 → 2.5.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svix",
3
- "version": "2.4.0",
3
+ "version": "2.5.0",
4
4
  "description": "Svix webhooks API client and webhook verification library",
5
5
  "author": "svix",
6
6
  "repository": "https://github.com/svix/svix-webhooks",
@@ -0,0 +1,53 @@
1
+ // this file is @generated
2
+
3
+ import { type AutoConfigOut, AutoConfigOutSerializer } from "../models/autoConfigOut";
4
+ import {
5
+ type RotateSubscriptionIn2,
6
+ RotateSubscriptionIn2Serializer,
7
+ } from "../models/rotateSubscriptionIn2";
8
+ import { HttpMethod, SvixRequest, type SvixRequestContext } from "../request";
9
+
10
+ export interface AutoconfigSubscriptionCreateOptions {
11
+ idempotencyKey?: string;
12
+ }
13
+
14
+ export interface AutoconfigSubscriptionRotateOptions {
15
+ idempotencyKey?: string;
16
+ }
17
+
18
+ export class AutoconfigSubscription {
19
+ public constructor(private readonly requestCtx: SvixRequestContext) {}
20
+
21
+ /** Create an AutoConfig subscription. */
22
+ public async create(
23
+ appId: string,
24
+ options?: AutoconfigSubscriptionCreateOptions
25
+ ): Promise<AutoConfigOut> {
26
+ const request = new SvixRequest(HttpMethod.POST, "/api/v1/app/{app_id}/autoconfig");
27
+
28
+ request.setPathParam("app_id", appId);
29
+ request.setHeaderParam("idempotency-key", options?.idempotencyKey);
30
+
31
+ return await request.send(this.requestCtx, AutoConfigOutSerializer._fromJsonObject);
32
+ }
33
+
34
+ /** Rotate the auth token and signing secret for an AutoConfig subscription. */
35
+ public async rotate(
36
+ appId: string,
37
+ autoconfigId: string,
38
+ rotateSubscriptionIn2: RotateSubscriptionIn2 = {},
39
+ options?: AutoconfigSubscriptionRotateOptions
40
+ ): Promise<AutoConfigOut> {
41
+ const request = new SvixRequest(
42
+ HttpMethod.POST,
43
+ "/api/v1/app/{app_id}/autoconfig/{autoconfig_id}/rotate"
44
+ );
45
+
46
+ request.setPathParam("app_id", appId);
47
+ request.setPathParam("autoconfig_id", autoconfigId);
48
+ request.setHeaderParam("idempotency-key", options?.idempotencyKey);
49
+ request.setBody(RotateSubscriptionIn2Serializer._toJsonObject(rotateSubscriptionIn2));
50
+
51
+ return await request.send(this.requestCtx, AutoConfigOutSerializer._fromJsonObject);
52
+ }
53
+ }
@@ -0,0 +1,40 @@
1
+ // this file is @generated
2
+
3
+ import {
4
+ type AutoConfigSubscriptionOut,
5
+ AutoConfigSubscriptionOutSerializer,
6
+ } from "../models/autoConfigSubscriptionOut";
7
+ import { AutoconfigSubscriptionDestination } from "./autoconfigSubscriptionDestination";
8
+ import { AutoconfigSubscriptionEndpoint } from "./autoconfigSubscriptionEndpoint";
9
+ import { HttpMethod, SvixRequest, type SvixRequestContext } from "../request";
10
+
11
+ export class AutoconfigSubscription {
12
+ public constructor(private readonly requestCtx: SvixRequestContext) {}
13
+
14
+ public get destination() {
15
+ return new AutoconfigSubscriptionDestination(this.requestCtx);
16
+ }
17
+
18
+ public get endpoint() {
19
+ return new AutoconfigSubscriptionEndpoint(this.requestCtx);
20
+ }
21
+
22
+ /** Get an AutoConfig subscription, including the bound endpoint or destination if any. */
23
+ public async get(
24
+ appId: string,
25
+ autoconfigId: string
26
+ ): Promise<AutoConfigSubscriptionOut> {
27
+ const request = new SvixRequest(
28
+ HttpMethod.GET,
29
+ "/api/v1/app/{app_id}/autoconfig/{autoconfig_id}"
30
+ );
31
+
32
+ request.setPathParam("app_id", appId);
33
+ request.setPathParam("autoconfig_id", autoconfigId);
34
+
35
+ return await request.send(
36
+ this.requestCtx,
37
+ AutoConfigSubscriptionOutSerializer._fromJsonObject
38
+ );
39
+ }
40
+ }
@@ -4,7 +4,7 @@ import { type DestinationIn, DestinationInSerializer } from "../models/destinati
4
4
  import { type DestinationOut, DestinationOutSerializer } from "../models/destinationOut";
5
5
  import { HttpMethod, SvixRequest, type SvixRequestContext } from "../request";
6
6
 
7
- export class DestinationAutoconfig {
7
+ export class AutoconfigSubscriptionDestination {
8
8
  public constructor(private readonly requestCtx: SvixRequestContext) {}
9
9
 
10
10
  /** Create or update the destination for an AutoConfig subscription. */
@@ -1,35 +1,12 @@
1
1
  // this file is @generated
2
2
 
3
- import {
4
- type AutoConfigSubscriptionOut,
5
- AutoConfigSubscriptionOutSerializer,
6
- } from "../models/autoConfigSubscriptionOut";
7
3
  import { type EndpointIn, EndpointInSerializer } from "../models/endpointIn";
8
4
  import { type EndpointOut, EndpointOutSerializer } from "../models/endpointOut";
9
5
  import { HttpMethod, SvixRequest, type SvixRequestContext } from "../request";
10
6
 
11
- export class EndpointAutoconfig {
7
+ export class AutoconfigSubscriptionEndpoint {
12
8
  public constructor(private readonly requestCtx: SvixRequestContext) {}
13
9
 
14
- /** Get an AutoConfig subscription, including the bound endpoint or destination if any. */
15
- public async get(
16
- appId: string,
17
- autoconfigId: string
18
- ): Promise<AutoConfigSubscriptionOut> {
19
- const request = new SvixRequest(
20
- HttpMethod.GET,
21
- "/api/v1/app/{app_id}/autoconfig/{autoconfig_id}"
22
- );
23
-
24
- request.setPathParam("app_id", appId);
25
- request.setPathParam("autoconfig_id", autoconfigId);
26
-
27
- return await request.send(
28
- this.requestCtx,
29
- AutoConfigSubscriptionOutSerializer._fromJsonObject
30
- );
31
- }
32
-
33
10
  /** Create or update the HTTP endpoint for an AutoConfig subscription. */
34
11
  public async subscribe(
35
12
  appId: string,
@@ -5,7 +5,6 @@ import {
5
5
  EndpointTransformationInSerializer,
6
6
  } from "../models/endpointTransformationIn";
7
7
  import { EndpointAutoConfigDeprecated } from "./endpointAutoConfigDeprecated";
8
- import { EndpointAutoconfig } from "./endpointAutoconfig";
9
8
  import { HttpMethod, SvixRequest, type SvixRequestContext } from "../request";
10
9
 
11
10
  export class Endpoint {
@@ -15,10 +14,6 @@ export class Endpoint {
15
14
  return new EndpointAutoConfigDeprecated(this.requestCtx);
16
15
  }
17
16
 
18
- public get autoconfig() {
19
- return new EndpointAutoconfig(this.requestCtx);
20
- }
21
-
22
17
  /**
23
18
  * This operation was renamed to `set-transformation`.
24
19
  *
package/src/autoconfig.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { SvixInternal } from "./api_internal";
2
+ import { AutoconfigSubscription } from "./api_internal/autoconfigSubscription";
2
3
  import { Endpoint as InternalEndpoint } from "./api_internal/endpoint";
3
4
  import type { EndpointIn } from "./models/endpointIn";
4
5
  import type { EndpointOut } from "./models/endpointOut";
@@ -157,7 +158,7 @@ export class AutoConfig {
157
158
  public subscribe(): Promise<EndpointOut> {
158
159
  const endpoint = new InternalEndpoint(this.requestCtx);
159
160
  if (this.autoconfigId != null) {
160
- return endpoint.autoconfig.subscribe(
161
+ return new AutoconfigSubscription(this.requestCtx).endpoint.subscribe(
161
162
  this.appId,
162
163
  this.autoconfigId,
163
164
  this.endpointIn
@@ -1,5 +1,5 @@
1
1
  import { SvixInternal } from "./api_internal";
2
- import { Destination as InternalDestination } from "./api_internal/destination";
2
+ import { AutoconfigSubscription } from "./api_internal/autoconfigSubscription";
3
3
  import { Endpoint as InternalEndpoint } from "./api_internal/endpoint";
4
4
  import {
5
5
  MessagePollerv2 as InternalMessagePollerv2,
@@ -44,9 +44,9 @@ export class AutoConfigConsumer {
44
44
  const endpoint = new InternalEndpoint(this.requestCtx);
45
45
  if (this.autoconfigId != null) {
46
46
  // v2
47
- const destination = await new InternalDestination(
47
+ const destination = await new AutoconfigSubscription(
48
48
  this.requestCtx
49
- ).autoconfig.subscribe(
49
+ ).destination.subscribe(
50
50
  this.appId,
51
51
  this.autoconfigId,
52
52
  sinkInCommonToPollingDestination(this.sinkIn)
@@ -74,7 +74,7 @@ export class AutoConfigConsumer {
74
74
 
75
75
  // Get the sink id from the autoconfig id (v2)
76
76
  const destId = (
77
- await new InternalEndpoint(this.requestCtx).autoconfig.get(
77
+ await new AutoconfigSubscription(this.requestCtx).get(
78
78
  this.appId,
79
79
  this.autoconfigId as string
80
80
  )
package/src/index.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  // this file is @generated
2
2
  import { Application } from "./api/application";
3
3
  import { Authentication } from "./api/authentication";
4
+ import { AutoconfigSubscription } from "./api/autoconfigSubscription";
4
5
  import { BackgroundTask } from "./api/backgroundTask";
5
6
  import { Connector } from "./api/connector";
6
7
  import { Destination } from "./api/destination";
@@ -70,6 +71,10 @@ export class Svix {
70
71
  return new Authentication(this.requestCtx);
71
72
  }
72
73
 
74
+ public get autoconfigSubscription() {
75
+ return new AutoconfigSubscription(this.requestCtx);
76
+ }
77
+
73
78
  public get backgroundTask() {
74
79
  return new BackgroundTask(this.requestCtx);
75
80
  }
@@ -0,0 +1,26 @@
1
+ // this file is @generated
2
+
3
+ export interface AutoConfigOut {
4
+ createdAt: Date;
5
+ token: string;
6
+ /** The AutoConfigSubscription's ID. */
7
+ id: string;
8
+ }
9
+
10
+ export const AutoConfigOutSerializer = {
11
+ _fromJsonObject(object: any): AutoConfigOut {
12
+ return {
13
+ createdAt: new Date(object["createdAt"]),
14
+ token: object["token"],
15
+ id: object["id"],
16
+ };
17
+ },
18
+
19
+ _toJsonObject(self: AutoConfigOut): any {
20
+ return {
21
+ createdAt: self.createdAt,
22
+ token: self.token,
23
+ id: self.id,
24
+ };
25
+ },
26
+ };
@@ -8,15 +8,23 @@ export interface EventBridgeConfigIn {
8
8
  /**
9
9
  * Access key ID.
10
10
  *
11
- * Currently a required field, but marked as optional because we may add different authentication in the future.
11
+ * Required (along with `secret_access_key`) if `role_arn` is blank.
12
12
  */
13
13
  accessKeyId?: string | null;
14
14
  /**
15
15
  * Secret access key.
16
16
  *
17
- * Currently a required field, but marked as optional because we may add different authentication in the future.
17
+ * Required (along with `access_key_id`) if `role_arn` is blank.
18
18
  */
19
19
  secretAccessKey?: string | null;
20
+ /** Role ARN for delegated authentication */
21
+ roleArn?: string | null;
22
+ /**
23
+ * Shared secret passed as the STS ExternalId.
24
+ *
25
+ * Can only be set if `role_arn` is Some
26
+ */
27
+ externalId?: string | null;
20
28
  /**
21
29
  * The region of the EventBridge bus.
22
30
  *
@@ -32,6 +40,8 @@ export const EventBridgeConfigInSerializer = {
32
40
  detailType: object["detailType"],
33
41
  accessKeyId: object["accessKeyId"],
34
42
  secretAccessKey: object["secretAccessKey"],
43
+ roleArn: object["roleArn"],
44
+ externalId: object["externalId"],
35
45
  region: object["region"],
36
46
  };
37
47
  },
@@ -42,6 +52,8 @@ export const EventBridgeConfigInSerializer = {
42
52
  detailType: self.detailType,
43
53
  accessKeyId: self.accessKeyId,
44
54
  secretAccessKey: self.secretAccessKey,
55
+ roleArn: self.roleArn,
56
+ externalId: self.externalId,
45
57
  region: self.region,
46
58
  };
47
59
  },
@@ -3,7 +3,9 @@
3
3
  export interface EventBridgeConfigOut {
4
4
  eventBusName: string;
5
5
  detailType: string;
6
- accessKeyId: string;
6
+ accessKeyId?: string | null;
7
+ roleArn?: string | null;
8
+ externalId?: string | null;
7
9
  region: string;
8
10
  }
9
11
 
@@ -13,6 +15,8 @@ export const EventBridgeConfigOutSerializer = {
13
15
  eventBusName: object["eventBusName"],
14
16
  detailType: object["detailType"],
15
17
  accessKeyId: object["accessKeyId"],
18
+ roleArn: object["roleArn"],
19
+ externalId: object["externalId"],
16
20
  region: object["region"],
17
21
  };
18
22
  },
@@ -22,6 +26,8 @@ export const EventBridgeConfigOutSerializer = {
22
26
  eventBusName: self.eventBusName,
23
27
  detailType: self.detailType,
24
28
  accessKeyId: self.accessKeyId,
29
+ roleArn: self.roleArn,
30
+ externalId: self.externalId,
25
31
  region: self.region,
26
32
  };
27
33
  },
@@ -5,6 +5,8 @@ export interface EventBridgeConfigPatch {
5
5
  detailType?: string;
6
6
  accessKeyId?: string;
7
7
  secretAccessKey?: string;
8
+ roleArn?: string;
9
+ externalId?: string;
8
10
  region?: string;
9
11
  }
10
12
 
@@ -15,6 +17,8 @@ export const EventBridgeConfigPatchSerializer = {
15
17
  detailType: object["detailType"],
16
18
  accessKeyId: object["accessKeyId"],
17
19
  secretAccessKey: object["secretAccessKey"],
20
+ roleArn: object["roleArn"],
21
+ externalId: object["externalId"],
18
22
  region: object["region"],
19
23
  };
20
24
  },
@@ -25,6 +29,8 @@ export const EventBridgeConfigPatchSerializer = {
25
29
  detailType: self.detailType,
26
30
  accessKeyId: self.accessKeyId,
27
31
  secretAccessKey: self.secretAccessKey,
32
+ roleArn: self.roleArn,
33
+ externalId: self.externalId,
28
34
  region: self.region,
29
35
  };
30
36
  },
@@ -14,6 +14,7 @@ export { type ApplicationIn } from "./applicationIn";
14
14
  export { type ApplicationOut } from "./applicationOut";
15
15
  export { type ApplicationPatch } from "./applicationPatch";
16
16
  export { type ApplicationTokenExpireIn } from "./applicationTokenExpireIn";
17
+ export { type AutoConfigOut } from "./autoConfigOut";
17
18
  export { type AzureBlobStorageConfigIn } from "./azureBlobStorageConfigIn";
18
19
  export { type AzureBlobStorageConfigOut } from "./azureBlobStorageConfigOut";
19
20
  export { type AzureBlobStorageConfigPatch } from "./azureBlobStorageConfigPatch";
@@ -182,6 +183,7 @@ export { type RedshiftConfigPatch } from "./redshiftConfigPatch";
182
183
  export { type ReplayIn } from "./replayIn";
183
184
  export { type ReplayOut } from "./replayOut";
184
185
  export { type RotatePollerTokenIn } from "./rotatePollerTokenIn";
186
+ export { type RotateSubscriptionIn2 } from "./rotateSubscriptionIn2";
185
187
  export { type RotateTokenOut } from "./rotateTokenOut";
186
188
  export { type RutterConfig } from "./rutterConfig";
187
189
  export { type RutterConfigOut } from "./rutterConfigOut";
@@ -9,15 +9,23 @@ export interface RedshiftConfigIn {
9
9
  /**
10
10
  * Access key ID.
11
11
  *
12
- * Currently a required field, but marked as optional because we may add different authentication in the future.
12
+ * Required (along with `secret_access_key`) if `role_arn` is blank.
13
13
  */
14
14
  accessKeyId?: string | null;
15
15
  /**
16
16
  * Secret access key.
17
17
  *
18
- * Currently a required field, but marked as optional because we may add different authentication in the future.
18
+ * Required (along with `access_key_id`) if `role_arn` is blank.
19
19
  */
20
20
  secretAccessKey?: string | null;
21
+ /** Role ARN for delegated authentication */
22
+ roleArn?: string | null;
23
+ /**
24
+ * Shared secret passed as the STS ExternalId.
25
+ *
26
+ * Can only be set if `role_arn` is Some
27
+ */
28
+ externalId?: string | null;
21
29
  /**
22
30
  * The region of the Redshift DB.
23
31
  *
@@ -55,6 +63,8 @@ export const RedshiftConfigInSerializer = {
55
63
  return {
56
64
  accessKeyId: object["accessKeyId"],
57
65
  secretAccessKey: object["secretAccessKey"],
66
+ roleArn: object["roleArn"],
67
+ externalId: object["externalId"],
58
68
  region: object["region"],
59
69
  clusterIdentifier: object["clusterIdentifier"],
60
70
  dbUser: object["dbUser"],
@@ -69,6 +79,8 @@ export const RedshiftConfigInSerializer = {
69
79
  return {
70
80
  accessKeyId: self.accessKeyId,
71
81
  secretAccessKey: self.secretAccessKey,
82
+ roleArn: self.roleArn,
83
+ externalId: self.externalId,
72
84
  region: self.region,
73
85
  clusterIdentifier: self.clusterIdentifier,
74
86
  dbUser: self.dbUser,
@@ -1,7 +1,9 @@
1
1
  // this file is @generated
2
2
 
3
3
  export interface RedshiftConfigOut {
4
- accessKeyId: string;
4
+ accessKeyId?: string | null;
5
+ roleArn?: string | null;
6
+ externalId?: string | null;
5
7
  region: string;
6
8
  clusterIdentifier?: string | null;
7
9
  dbUser?: string | null;
@@ -30,6 +32,8 @@ export const RedshiftConfigOutSerializer = {
30
32
  _fromJsonObject(object: any): RedshiftConfigOut {
31
33
  return {
32
34
  accessKeyId: object["accessKeyId"],
35
+ roleArn: object["roleArn"],
36
+ externalId: object["externalId"],
33
37
  region: object["region"],
34
38
  clusterIdentifier: object["clusterIdentifier"],
35
39
  dbUser: object["dbUser"],
@@ -43,6 +47,8 @@ export const RedshiftConfigOutSerializer = {
43
47
  _toJsonObject(self: RedshiftConfigOut): any {
44
48
  return {
45
49
  accessKeyId: self.accessKeyId,
50
+ roleArn: self.roleArn,
51
+ externalId: self.externalId,
46
52
  region: self.region,
47
53
  clusterIdentifier: self.clusterIdentifier,
48
54
  dbUser: self.dbUser,
@@ -3,6 +3,8 @@
3
3
  export interface RedshiftConfigPatch {
4
4
  accessKeyId?: string;
5
5
  secretAccessKey?: string;
6
+ roleArn?: string;
7
+ externalId?: string;
6
8
  region?: string;
7
9
  /**
8
10
  * Database name.
@@ -29,6 +31,8 @@ export const RedshiftConfigPatchSerializer = {
29
31
  return {
30
32
  accessKeyId: object["accessKeyId"],
31
33
  secretAccessKey: object["secretAccessKey"],
34
+ roleArn: object["roleArn"],
35
+ externalId: object["externalId"],
32
36
  region: object["region"],
33
37
  dbName: object["dbName"],
34
38
  schemaName: object["schemaName"],
@@ -40,6 +44,8 @@ export const RedshiftConfigPatchSerializer = {
40
44
  return {
41
45
  accessKeyId: self.accessKeyId,
42
46
  secretAccessKey: self.secretAccessKey,
47
+ roleArn: self.roleArn,
48
+ externalId: self.externalId,
43
49
  region: self.region,
44
50
  dbName: self.dbName,
45
51
  schemaName: self.schemaName,
@@ -0,0 +1,29 @@
1
+ // this file is @generated
2
+ import {
3
+ type EndpointSecretRotateIn,
4
+ EndpointSecretRotateInSerializer,
5
+ } from "./endpointSecretRotateIn";
6
+
7
+ export interface RotateSubscriptionIn2 {
8
+ signingSecret?: EndpointSecretRotateIn | null;
9
+ }
10
+
11
+ export const RotateSubscriptionIn2Serializer = {
12
+ _fromJsonObject(object: any): RotateSubscriptionIn2 {
13
+ return {
14
+ signingSecret:
15
+ object["signingSecret"] != null
16
+ ? EndpointSecretRotateInSerializer._fromJsonObject(object["signingSecret"])
17
+ : undefined,
18
+ };
19
+ },
20
+
21
+ _toJsonObject(self: RotateSubscriptionIn2): any {
22
+ return {
23
+ signingSecret:
24
+ self.signingSecret != null
25
+ ? EndpointSecretRotateInSerializer._toJsonObject(self.signingSecret)
26
+ : undefined,
27
+ };
28
+ },
29
+ };
@@ -12,16 +12,24 @@ export interface SnsConfigIn {
12
12
  /**
13
13
  * Access key ID.
14
14
  *
15
- * Currently a required field, but marked as optional because we may add different authentication in the future.
15
+ * Required (along with `secret_access_key`) if `role_arn` is None
16
16
  */
17
17
  accessKeyId?: string | null;
18
18
  /**
19
19
  * Secret access key.
20
20
  *
21
- * Currently a required field, but marked as optional because we may add different authentication in the future.
21
+ * Required (along with `access_key_id`) if `role_arn` is None
22
22
  */
23
23
  secretAccessKey?: string | null;
24
24
  endpointUrl?: string | null;
25
+ /** Role ARN for delegated authentication */
26
+ roleArn?: string | null;
27
+ /**
28
+ * Shared secret passed as the STS ExternalId.
29
+ *
30
+ * Can only be set if `role_arn` is Some
31
+ */
32
+ externalId?: string | null;
25
33
  }
26
34
 
27
35
  export const SnsConfigInSerializer = {
@@ -32,6 +40,8 @@ export const SnsConfigInSerializer = {
32
40
  accessKeyId: object["accessKeyId"],
33
41
  secretAccessKey: object["secretAccessKey"],
34
42
  endpointUrl: object["endpointUrl"],
43
+ roleArn: object["roleArn"],
44
+ externalId: object["externalId"],
35
45
  };
36
46
  },
37
47
 
@@ -42,6 +52,8 @@ export const SnsConfigInSerializer = {
42
52
  accessKeyId: self.accessKeyId,
43
53
  secretAccessKey: self.secretAccessKey,
44
54
  endpointUrl: self.endpointUrl,
55
+ roleArn: self.roleArn,
56
+ externalId: self.externalId,
45
57
  };
46
58
  },
47
59
  };
@@ -3,7 +3,9 @@
3
3
  export interface SnsConfigOut {
4
4
  topicArn: string;
5
5
  region: string;
6
- accessKeyId: string;
6
+ accessKeyId?: string | null;
7
+ roleArn?: string | null;
8
+ externalId?: string | null;
7
9
  }
8
10
 
9
11
  export const SnsConfigOutSerializer = {
@@ -12,6 +14,8 @@ export const SnsConfigOutSerializer = {
12
14
  topicArn: object["topicArn"],
13
15
  region: object["region"],
14
16
  accessKeyId: object["accessKeyId"],
17
+ roleArn: object["roleArn"],
18
+ externalId: object["externalId"],
15
19
  };
16
20
  },
17
21
 
@@ -20,6 +24,8 @@ export const SnsConfigOutSerializer = {
20
24
  topicArn: self.topicArn,
21
25
  region: self.region,
22
26
  accessKeyId: self.accessKeyId,
27
+ roleArn: self.roleArn,
28
+ externalId: self.externalId,
23
29
  };
24
30
  },
25
31
  };
@@ -5,6 +5,8 @@ export interface SnsConfigPatch {
5
5
  region?: string;
6
6
  accessKeyId?: string;
7
7
  secretAccessKey?: string;
8
+ roleArn?: string;
9
+ externalId?: string;
8
10
  endpointUrl?: string | null;
9
11
  }
10
12
 
@@ -15,6 +17,8 @@ export const SnsConfigPatchSerializer = {
15
17
  region: object["region"],
16
18
  accessKeyId: object["accessKeyId"],
17
19
  secretAccessKey: object["secretAccessKey"],
20
+ roleArn: object["roleArn"],
21
+ externalId: object["externalId"],
18
22
  endpointUrl: object["endpointUrl"],
19
23
  };
20
24
  },
@@ -25,6 +29,8 @@ export const SnsConfigPatchSerializer = {
25
29
  region: self.region,
26
30
  accessKeyId: self.accessKeyId,
27
31
  secretAccessKey: self.secretAccessKey,
32
+ roleArn: self.roleArn,
33
+ externalId: self.externalId,
28
34
  endpointUrl: self.endpointUrl,
29
35
  };
30
36
  },
@@ -12,15 +12,23 @@ export interface SqsConfigIn {
12
12
  /**
13
13
  * Access key ID.
14
14
  *
15
- * Currently a required field, but marked as optional because we may add different authentication in the future.
15
+ * Required (along with `secret_access_key`) if `role_arn` is blank.
16
16
  */
17
17
  accessKeyId?: string | null;
18
18
  /**
19
19
  * Secret access key.
20
20
  *
21
- * Currently a required field, but marked as optional because we may add different authentication in the future.
21
+ * Required (along with `access_key_id`) if `role_arn` is blank.
22
22
  */
23
23
  secretAccessKey?: string | null;
24
+ /** Role ARN for delegated authentication */
25
+ roleArn?: string | null;
26
+ /**
27
+ * Shared secret passed as the STS ExternalId.
28
+ *
29
+ * Can only be set if `role_arn` is Some
30
+ */
31
+ externalId?: string | null;
24
32
  endpointUrl?: string | null;
25
33
  }
26
34
 
@@ -31,6 +39,8 @@ export const SqsConfigInSerializer = {
31
39
  region: object["region"],
32
40
  accessKeyId: object["accessKeyId"],
33
41
  secretAccessKey: object["secretAccessKey"],
42
+ roleArn: object["roleArn"],
43
+ externalId: object["externalId"],
34
44
  endpointUrl: object["endpointUrl"],
35
45
  };
36
46
  },
@@ -41,6 +51,8 @@ export const SqsConfigInSerializer = {
41
51
  region: self.region,
42
52
  accessKeyId: self.accessKeyId,
43
53
  secretAccessKey: self.secretAccessKey,
54
+ roleArn: self.roleArn,
55
+ externalId: self.externalId,
44
56
  endpointUrl: self.endpointUrl,
45
57
  };
46
58
  },