--- swagger: "2.0" info: version: "2017-01-11T15:26:54Z" title: "Account Federation Interface" schemes: - "https" paths: /federation: get: consumes: - "application/json" produces: - "application/json" parameters: - name: "federateAccount" in: "query" required: true type: "string" - name: "federateRoleName" in: "query" required: true type: "string" - name: "roleExternalId" in: "header" required: true type: "string" - name: "account" in: "query" required: true type: "string" - name: "region" in: "query" required: true type: "string" - name: "roleName" in: "query" required: true type: "string" responses: 200: description: "200 response" schema: $ref: "#/definitions/Empty" headers: Access-Control-Allow-Origin: type: "string" 401: description: "401 response" schema: $ref: "#/definitions/Empty" headers: Access-Control-Allow-Origin: type: "string" Access-Control-Allow-Methods: type: "string" Access-Control-Allow-Headers: type: "string" 403: description: "403 response" schema: $ref: "#/definitions/Empty" headers: Access-Control-Allow-Origin: type: "string" Access-Control-Allow-Methods: type: "string" Access-Control-Allow-Headers: type: "string" security: - SSOAuthorizer: [] x-amazon-apigateway-integration: responses: default: statusCode: "200" responseParameters: method.response.header.Access-Control-Allow-Origin: "'*'" not permitted.*: statusCode: "401" responseParameters: method.response.header.Access-Control-Allow-Origin: "'*'" Unauthorized.*: statusCode: "403" responseParameters: method.response.header.Access-Control-Allow-Origin: "'*'" requestTemplates: application/json: "{\n \"roles\":[\n {\"roleArn\": \"arn:aws:iam::$input.params('federateAccount'):role/$input.params('federateRoleName')\"\ },\n {\"roleArn\": \"arn:aws:iam::$input.params('account'):role/$input.params('roleName')\"\ , \"externalId\": \"$input.params().header.get('roleExternalId')\"}\n\ \ ],\n \"sessionName\":\"session1\",\n \"durationSeconds\":0,\n \"authorizer_refresh_token\": \"$context.authorizer.refresh_token\",\ \n \"authorizer_user_guid\": \"$context.authorizer.user_guid\",\n \"authorizer_error\": \"$context.authorizer.error\"}" uri: "arn:aws:apigateway:AWS::REGION:lambda:path/2015-03-31/functions/arn:aws:lambda:AWS::REGION:AWS::ACCOUNT_ID:function:${stageVariables.LambdaFunctionName}/invocations" passthroughBehavior: "when_no_match" httpMethod: "POST" contentHandling: "CONVERT_TO_TEXT" type: "aws" options: consumes: - "application/json" produces: - "application/json" responses: 200: description: "200 response" schema: $ref: "#/definitions/Empty" headers: Access-Control-Allow-Origin: type: "string" Access-Control-Allow-Methods: type: "string" Access-Control-Allow-Headers: type: "string" 401: description: "401 response" schema: $ref: "#/definitions/Empty" headers: Access-Control-Allow-Origin: type: "string" Access-Control-Allow-Methods: type: "string" Access-Control-Allow-Headers: type: "string" 403: description: "403 response" schema: $ref: "#/definitions/Empty" headers: Access-Control-Allow-Origin: type: "string" Access-Control-Allow-Methods: type: "string" Access-Control-Allow-Headers: type: "string" x-amazon-apigateway-integration: responses: default: statusCode: "200" responseParameters: method.response.header.Access-Control-Allow-Methods: "'GET,OPTIONS'" method.response.header.Access-Control-Allow-Headers: "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,roleExternalId'" method.response.header.Access-Control-Allow-Origin: "'*'" not permitted.*: statusCode: "401" responseParameters: method.response.header.Access-Control-Allow-Methods: "'OPTIONS'" method.response.header.Access-Control-Allow-Headers: "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,roleExternalId'" method.response.header.Access-Control-Allow-Origin: "'*'" Unauthorized.*: statusCode: "403" responseParameters: method.response.header.Access-Control-Allow-Methods: "'OPTIONS'" method.response.header.Access-Control-Allow-Headers: "'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token,roleExternalId'" method.response.header.Access-Control-Allow-Origin: "'*'" requestTemplates: application/json: "{\"statusCode\": 200}" passthroughBehavior: "when_no_match" type: "mock" securityDefinitions: SSOAuthorizer: type: "apiKey" name: "Authorization" in: "header" x-amazon-apigateway-authtype: "custom" x-amazon-apigateway-authorizer: authorizerCredentials: "arn:aws:iam::AWS::ACCOUNT_ID:role/AWS::CUSTOM_AUTHORIZER_ROLE_NAME" authorizerResultTtlInSeconds: 300 authorizerUri: "arn:aws:apigateway:AWS::REGION:lambda:path/2015-03-31/functions/arn:aws:lambda:AWS::REGION:AWS::ACCOUNT_ID:function:AWS::CUSTOM_AUTHORIZER_LAMBDA_NAME/invocations" type: "token" definitions: Empty: type: "object" title: "Empty Schema"