@@ -21,6 +21,7 @@ import { AWSAccountCreateRequest } from "../models/AWSAccountCreateRequest";
2121import { AWSAccountResponse } from "../models/AWSAccountResponse" ;
2222import { AWSAccountsResponse } from "../models/AWSAccountsResponse" ;
2323import { AWSAccountUpdateRequest } from "../models/AWSAccountUpdateRequest" ;
24+ import { AWSIntegrationIamPermissionsResponse } from "../models/AWSIntegrationIamPermissionsResponse" ;
2425import { AWSNamespacesResponse } from "../models/AWSNamespacesResponse" ;
2526import { AWSNewExternalIDResponse } from "../models/AWSNewExternalIDResponse" ;
2627
@@ -180,6 +181,30 @@ export class AWSIntegrationApiRequestFactory extends BaseAPIRequestFactory {
180181 return requestContext ;
181182 }
182183
184+ public async getAWSIntegrationIAMPermissions (
185+ _options ?: Configuration
186+ ) : Promise < RequestContext > {
187+ const _config = _options || this . configuration ;
188+
189+ // Path Params
190+ const localVarPath = "/api/v2/integration/aws/iam_permissions" ;
191+
192+ // Make Request Context
193+ const requestContext = _config
194+ . getServer ( "v2.AWSIntegrationApi.getAWSIntegrationIAMPermissions" )
195+ . makeRequestContext ( localVarPath , HttpMethod . GET ) ;
196+ requestContext . setHeaderParam ( "Accept" , "application/json" ) ;
197+ requestContext . setHttpConfig ( _config . httpConfig ) ;
198+
199+ // Apply auth methods
200+ applySecurityAuthentication ( _config , requestContext , [
201+ "apiKeyAuth" ,
202+ "appKeyAuth" ,
203+ ] ) ;
204+
205+ return requestContext ;
206+ }
207+
183208 public async listAWSAccounts (
184209 awsAccountId ?: string ,
185210 _options ?: Configuration
@@ -547,6 +572,66 @@ export class AWSIntegrationApiResponseProcessor {
547572 ) ;
548573 }
549574
575+ /**
576+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
577+ * to the expected objects
578+ *
579+ * @params response Response returned by the server for a request to getAWSIntegrationIAMPermissions
580+ * @throws ApiException if the response code was not in [200, 299]
581+ */
582+ public async getAWSIntegrationIAMPermissions (
583+ response : ResponseContext
584+ ) : Promise < AWSIntegrationIamPermissionsResponse > {
585+ const contentType = ObjectSerializer . normalizeMediaType (
586+ response . headers [ "content-type" ]
587+ ) ;
588+ if ( response . httpStatusCode === 200 ) {
589+ const body : AWSIntegrationIamPermissionsResponse =
590+ ObjectSerializer . deserialize (
591+ ObjectSerializer . parse ( await response . body . text ( ) , contentType ) ,
592+ "AWSIntegrationIamPermissionsResponse"
593+ ) as AWSIntegrationIamPermissionsResponse ;
594+ return body ;
595+ }
596+ if ( response . httpStatusCode === 429 ) {
597+ const bodyText = ObjectSerializer . parse (
598+ await response . body . text ( ) ,
599+ contentType
600+ ) ;
601+ let body : APIErrorResponse ;
602+ try {
603+ body = ObjectSerializer . deserialize (
604+ bodyText ,
605+ "APIErrorResponse"
606+ ) as APIErrorResponse ;
607+ } catch ( error ) {
608+ logger . debug ( `Got error deserializing error: ${ error } ` ) ;
609+ throw new ApiException < APIErrorResponse > (
610+ response . httpStatusCode ,
611+ bodyText
612+ ) ;
613+ }
614+ throw new ApiException < APIErrorResponse > ( response . httpStatusCode , body ) ;
615+ }
616+
617+ // Work around for missing responses in specification, e.g. for petstore.yaml
618+ if ( response . httpStatusCode >= 200 && response . httpStatusCode <= 299 ) {
619+ const body : AWSIntegrationIamPermissionsResponse =
620+ ObjectSerializer . deserialize (
621+ ObjectSerializer . parse ( await response . body . text ( ) , contentType ) ,
622+ "AWSIntegrationIamPermissionsResponse" ,
623+ ""
624+ ) as AWSIntegrationIamPermissionsResponse ;
625+ return body ;
626+ }
627+
628+ const body = ( await response . body . text ( ) ) || "" ;
629+ throw new ApiException < string > (
630+ response . httpStatusCode ,
631+ 'Unknown API Status Code!\nBody: "' + body + '"'
632+ ) ;
633+ }
634+
550635 /**
551636 * Unwraps the actual response sent by the server from the response context and deserializes the response content
552637 * to the expected objects
@@ -871,6 +956,26 @@ export class AWSIntegrationApi {
871956 } ) ;
872957 }
873958
959+ /**
960+ * Get all AWS IAM permissions required for the AWS integration.
961+ * @param param The request object
962+ */
963+ public getAWSIntegrationIAMPermissions (
964+ options ?: Configuration
965+ ) : Promise < AWSIntegrationIamPermissionsResponse > {
966+ const requestContextPromise =
967+ this . requestFactory . getAWSIntegrationIAMPermissions ( options ) ;
968+ return requestContextPromise . then ( ( requestContext ) => {
969+ return this . configuration . httpApi
970+ . send ( requestContext )
971+ . then ( ( responseContext ) => {
972+ return this . responseProcessor . getAWSIntegrationIAMPermissions (
973+ responseContext
974+ ) ;
975+ } ) ;
976+ } ) ;
977+ }
978+
874979 /**
875980 * Get a list of AWS Account Integration Configs.
876981 * @param param The request object
0 commit comments