{
    "smithy": "1.0",
    "metadata": {
        "suppressions": [
            {
                "id": "HttpMethodSemantics",
                "namespace": "*"
            },
            {
                "id": "HttpResponseCodeSemantics",
                "namespace": "*"
            },
            {
                "id": "PaginatedTrait",
                "namespace": "*"
            },
            {
                "id": "HttpHeaderTrait",
                "namespace": "*"
            },
            {
                "id": "HttpUriConflict",
                "namespace": "*"
            },
            {
                "id": "Service",
                "namespace": "*"
            }
        ]
    },
    "shapes": {
        "com.amazonaws.sso#AccessKeyType": {
            "type": "string"
        },
        "com.amazonaws.sso#AccessTokenType": {
            "type": "string",
            "traits": {
                "smithy.api#sensitive": {}
            }
        },
        "com.amazonaws.sso#AccountIdType": {
            "type": "string"
        },
        "com.amazonaws.sso#AccountInfo": {
            "type": "structure",
            "members": {
                "accountId": {
                    "target": "com.amazonaws.sso#AccountIdType",
                    "traits": {
                        "smithy.api#documentation": "<p>The identifier of the AWS account that is assigned to the user.</p>"
                    }
                },
                "accountName": {
                    "target": "com.amazonaws.sso#AccountNameType",
                    "traits": {
                        "smithy.api#documentation": "<p>The display name of the AWS account that is assigned to the user.</p>"
                    }
                },
                "emailAddress": {
                    "target": "com.amazonaws.sso#EmailAddressType",
                    "traits": {
                        "smithy.api#documentation": "<p>The email address of the AWS account that is assigned to the user.</p>"
                    }
                }
            },
            "traits": {
                "smithy.api#documentation": "<p>Provides information about your AWS account.</p>"
            }
        },
        "com.amazonaws.sso#AccountListType": {
            "type": "list",
            "member": {
                "target": "com.amazonaws.sso#AccountInfo"
            }
        },
        "com.amazonaws.sso#AccountNameType": {
            "type": "string"
        },
        "com.amazonaws.sso#EmailAddressType": {
            "type": "string",
            "traits": {
                "smithy.api#length": {
                    "min": 1,
                    "max": 254
                }
            }
        },
        "com.amazonaws.sso#ErrorDescription": {
            "type": "string"
        },
        "com.amazonaws.sso#ExpirationTimestampType": {
            "type": "long"
        },
        "com.amazonaws.sso#GetRoleCredentials": {
            "type": "operation",
            "input": {
                "target": "com.amazonaws.sso#GetRoleCredentialsRequest"
            },
            "output": {
                "target": "com.amazonaws.sso#GetRoleCredentialsResponse"
            },
            "errors": [
                {
                    "target": "com.amazonaws.sso#InvalidRequestException"
                },
                {
                    "target": "com.amazonaws.sso#ResourceNotFoundException"
                },
                {
                    "target": "com.amazonaws.sso#TooManyRequestsException"
                },
                {
                    "target": "com.amazonaws.sso#UnauthorizedException"
                }
            ],
            "traits": {
                "smithy.api#auth": [],
                "smithy.api#documentation": "<p>Returns the STS short-term credentials for a given role name that is assigned to the\n      user.</p>",
                "smithy.api#http": {
                    "method": "GET",
                    "uri": "/federation/credentials",
                    "code": 200
                },
                "smithy.api#optionalAuth": {}
            }
        },
        "com.amazonaws.sso#GetRoleCredentialsRequest": {
            "type": "structure",
            "members": {
                "roleName": {
                    "target": "com.amazonaws.sso#RoleNameType",
                    "traits": {
                        "smithy.api#documentation": "<p>The friendly name of the role that is assigned to the user.</p>",
                        "smithy.api#httpQuery": "role_name",
                        "smithy.api#required": {}
                    }
                },
                "accountId": {
                    "target": "com.amazonaws.sso#AccountIdType",
                    "traits": {
                        "smithy.api#documentation": "<p>The identifier for the AWS account that is assigned to the user.</p>",
                        "smithy.api#httpQuery": "account_id",
                        "smithy.api#required": {}
                    }
                },
                "accessToken": {
                    "target": "com.amazonaws.sso#AccessTokenType",
                    "traits": {
                        "smithy.api#documentation": "<p>The token issued by the <code>CreateToken</code> API call. For more information, see\n        <a href=\"https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html\">CreateToken</a> in the <i>AWS SSO OIDC API Reference Guide</i>.</p>",
                        "smithy.api#httpHeader": "x-amz-sso_bearer_token",
                        "smithy.api#required": {}
                    }
                }
            }
        },
        "com.amazonaws.sso#GetRoleCredentialsResponse": {
            "type": "structure",
            "members": {
                "roleCredentials": {
                    "target": "com.amazonaws.sso#RoleCredentials",
                    "traits": {
                        "smithy.api#documentation": "<p>The credentials for the role that is assigned to the user.</p>"
                    }
                }
            }
        },
        "com.amazonaws.sso#InvalidRequestException": {
            "type": "structure",
            "members": {
                "message": {
                    "target": "com.amazonaws.sso#ErrorDescription"
                }
            },
            "traits": {
                "smithy.api#documentation": "<p>Indicates that a problem occurred with the input to the request. For example, a required\n      parameter might be missing or out of range.</p>",
                "smithy.api#error": "client",
                "smithy.api#httpError": 400
            }
        },
        "com.amazonaws.sso#ListAccountRoles": {
            "type": "operation",
            "input": {
                "target": "com.amazonaws.sso#ListAccountRolesRequest"
            },
            "output": {
                "target": "com.amazonaws.sso#ListAccountRolesResponse"
            },
            "errors": [
                {
                    "target": "com.amazonaws.sso#InvalidRequestException"
                },
                {
                    "target": "com.amazonaws.sso#ResourceNotFoundException"
                },
                {
                    "target": "com.amazonaws.sso#TooManyRequestsException"
                },
                {
                    "target": "com.amazonaws.sso#UnauthorizedException"
                }
            ],
            "traits": {
                "smithy.api#auth": [],
                "smithy.api#documentation": "<p>Lists all roles that are assigned to the user for a given AWS account.</p>",
                "smithy.api#http": {
                    "method": "GET",
                    "uri": "/assignment/roles",
                    "code": 200
                },
                "smithy.api#optionalAuth": {},
                "smithy.api#paginated": {
                    "inputToken": "nextToken",
                    "outputToken": "nextToken",
                    "pageSize": "maxResults"
                }
            }
        },
        "com.amazonaws.sso#ListAccountRolesRequest": {
            "type": "structure",
            "members": {
                "nextToken": {
                    "target": "com.amazonaws.sso#NextTokenType",
                    "traits": {
                        "smithy.api#documentation": "<p>The page token from the previous response output when you request subsequent pages.</p>",
                        "smithy.api#httpQuery": "next_token"
                    }
                },
                "maxResults": {
                    "target": "com.amazonaws.sso#MaxResultType",
                    "traits": {
                        "smithy.api#documentation": "<p>The number of items that clients can request per page.</p>",
                        "smithy.api#httpQuery": "max_result"
                    }
                },
                "accessToken": {
                    "target": "com.amazonaws.sso#AccessTokenType",
                    "traits": {
                        "smithy.api#documentation": "<p>The token issued by the <code>CreateToken</code> API call. For more information, see\n        <a href=\"https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html\">CreateToken</a> in the <i>AWS SSO OIDC API Reference Guide</i>.</p>",
                        "smithy.api#httpHeader": "x-amz-sso_bearer_token",
                        "smithy.api#required": {}
                    }
                },
                "accountId": {
                    "target": "com.amazonaws.sso#AccountIdType",
                    "traits": {
                        "smithy.api#documentation": "<p>The identifier for the AWS account that is assigned to the user.</p>",
                        "smithy.api#httpQuery": "account_id",
                        "smithy.api#required": {}
                    }
                }
            }
        },
        "com.amazonaws.sso#ListAccountRolesResponse": {
            "type": "structure",
            "members": {
                "nextToken": {
                    "target": "com.amazonaws.sso#NextTokenType",
                    "traits": {
                        "smithy.api#documentation": "<p>The page token client that is used to retrieve the list of accounts.</p>"
                    }
                },
                "roleList": {
                    "target": "com.amazonaws.sso#RoleListType",
                    "traits": {
                        "smithy.api#documentation": "<p>A paginated response with the list of roles and the next token if more results are available.</p>"
                    }
                }
            }
        },
        "com.amazonaws.sso#ListAccounts": {
            "type": "operation",
            "input": {
                "target": "com.amazonaws.sso#ListAccountsRequest"
            },
            "output": {
                "target": "com.amazonaws.sso#ListAccountsResponse"
            },
            "errors": [
                {
                    "target": "com.amazonaws.sso#InvalidRequestException"
                },
                {
                    "target": "com.amazonaws.sso#ResourceNotFoundException"
                },
                {
                    "target": "com.amazonaws.sso#TooManyRequestsException"
                },
                {
                    "target": "com.amazonaws.sso#UnauthorizedException"
                }
            ],
            "traits": {
                "smithy.api#auth": [],
                "smithy.api#documentation": "<p>Lists all AWS accounts assigned to the user. These AWS accounts are assigned by the\n      administrator of the account. For more information, see <a href=\"https://docs.aws.amazon.com/singlesignon/latest/userguide/useraccess.html#assignusers\">Assign User Access</a> in the <i>AWS SSO User Guide</i>. This operation\n      returns a paginated response.</p>",
                "smithy.api#http": {
                    "method": "GET",
                    "uri": "/assignment/accounts",
                    "code": 200
                },
                "smithy.api#optionalAuth": {},
                "smithy.api#paginated": {
                    "inputToken": "nextToken",
                    "outputToken": "nextToken",
                    "pageSize": "maxResults"
                }
            }
        },
        "com.amazonaws.sso#ListAccountsRequest": {
            "type": "structure",
            "members": {
                "nextToken": {
                    "target": "com.amazonaws.sso#NextTokenType",
                    "traits": {
                        "smithy.api#documentation": "<p>(Optional) When requesting subsequent pages, this is the page token from the previous response output.</p>",
                        "smithy.api#httpQuery": "next_token"
                    }
                },
                "maxResults": {
                    "target": "com.amazonaws.sso#MaxResultType",
                    "traits": {
                        "smithy.api#documentation": "<p>This is the number of items clients can request per page.</p>",
                        "smithy.api#httpQuery": "max_result"
                    }
                },
                "accessToken": {
                    "target": "com.amazonaws.sso#AccessTokenType",
                    "traits": {
                        "smithy.api#documentation": "<p>The token issued by the <code>CreateToken</code> API call. For more information, see\n        <a href=\"https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html\">CreateToken</a> in the <i>AWS SSO OIDC API Reference Guide</i>.</p>",
                        "smithy.api#httpHeader": "x-amz-sso_bearer_token",
                        "smithy.api#required": {}
                    }
                }
            }
        },
        "com.amazonaws.sso#ListAccountsResponse": {
            "type": "structure",
            "members": {
                "nextToken": {
                    "target": "com.amazonaws.sso#NextTokenType",
                    "traits": {
                        "smithy.api#documentation": "<p>The page token client that is used to retrieve the list of accounts.</p>"
                    }
                },
                "accountList": {
                    "target": "com.amazonaws.sso#AccountListType",
                    "traits": {
                        "smithy.api#documentation": "<p>A paginated response with the list of account information and the next token if more results are available.</p>"
                    }
                }
            }
        },
        "com.amazonaws.sso#Logout": {
            "type": "operation",
            "input": {
                "target": "com.amazonaws.sso#LogoutRequest"
            },
            "errors": [
                {
                    "target": "com.amazonaws.sso#InvalidRequestException"
                },
                {
                    "target": "com.amazonaws.sso#TooManyRequestsException"
                },
                {
                    "target": "com.amazonaws.sso#UnauthorizedException"
                }
            ],
            "traits": {
                "smithy.api#auth": [],
                "smithy.api#documentation": "<p>Removes the client- and server-side session that is associated with the user.</p>",
                "smithy.api#http": {
                    "method": "POST",
                    "uri": "/logout",
                    "code": 200
                },
                "smithy.api#optionalAuth": {}
            }
        },
        "com.amazonaws.sso#LogoutRequest": {
            "type": "structure",
            "members": {
                "accessToken": {
                    "target": "com.amazonaws.sso#AccessTokenType",
                    "traits": {
                        "smithy.api#documentation": "<p>The token issued by the <code>CreateToken</code> API call. For more information, see\n        <a href=\"https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html\">CreateToken</a> in the <i>AWS SSO OIDC API Reference Guide</i>.</p>",
                        "smithy.api#httpHeader": "x-amz-sso_bearer_token",
                        "smithy.api#required": {}
                    }
                }
            }
        },
        "com.amazonaws.sso#MaxResultType": {
            "type": "integer",
            "traits": {
                "smithy.api#box": {},
                "smithy.api#range": {
                    "min": 1,
                    "max": 100
                }
            }
        },
        "com.amazonaws.sso#NextTokenType": {
            "type": "string"
        },
        "com.amazonaws.sso#ResourceNotFoundException": {
            "type": "structure",
            "members": {
                "message": {
                    "target": "com.amazonaws.sso#ErrorDescription"
                }
            },
            "traits": {
                "smithy.api#documentation": "<p>The specified resource doesn't exist.</p>",
                "smithy.api#error": "client",
                "smithy.api#httpError": 404
            }
        },
        "com.amazonaws.sso#RoleCredentials": {
            "type": "structure",
            "members": {
                "accessKeyId": {
                    "target": "com.amazonaws.sso#AccessKeyType",
                    "traits": {
                        "smithy.api#documentation": "<p>The identifier used for the temporary security credentials. For more information, see\n        <a href=\"https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html\">Using Temporary Security Credentials to Request Access to AWS Resources</a> in the\n        <i>AWS IAM User Guide</i>.</p>"
                    }
                },
                "secretAccessKey": {
                    "target": "com.amazonaws.sso#SecretAccessKeyType",
                    "traits": {
                        "smithy.api#documentation": "<p>The key that is used to sign the request. For more information, see <a href=\"https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html\">Using Temporary Security Credentials to Request Access to AWS Resources</a> in the\n        <i>AWS IAM User Guide</i>.</p>"
                    }
                },
                "sessionToken": {
                    "target": "com.amazonaws.sso#SessionTokenType",
                    "traits": {
                        "smithy.api#documentation": "<p>The token used for temporary credentials. For more information, see <a href=\"https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html\">Using Temporary Security Credentials to Request Access to AWS Resources</a> in the\n        <i>AWS IAM User Guide</i>.</p>"
                    }
                },
                "expiration": {
                    "target": "com.amazonaws.sso#ExpirationTimestampType",
                    "traits": {
                        "smithy.api#documentation": "<p>The date on which temporary security credentials expire.</p>"
                    }
                }
            },
            "traits": {
                "smithy.api#documentation": "<p>Provides information about the role credentials that are assigned to the user.</p>"
            }
        },
        "com.amazonaws.sso#RoleInfo": {
            "type": "structure",
            "members": {
                "roleName": {
                    "target": "com.amazonaws.sso#RoleNameType",
                    "traits": {
                        "smithy.api#documentation": "<p>The friendly name of the role that is assigned to the user.</p>"
                    }
                },
                "accountId": {
                    "target": "com.amazonaws.sso#AccountIdType",
                    "traits": {
                        "smithy.api#documentation": "<p>The identifier of the AWS account assigned to the user.</p>"
                    }
                }
            },
            "traits": {
                "smithy.api#documentation": "<p>Provides information about the role that is assigned to the user.</p>"
            }
        },
        "com.amazonaws.sso#RoleListType": {
            "type": "list",
            "member": {
                "target": "com.amazonaws.sso#RoleInfo"
            }
        },
        "com.amazonaws.sso#RoleNameType": {
            "type": "string"
        },
        "com.amazonaws.sso#SWBPortalService": {
            "type": "service",
            "version": "2019-06-10",
            "operations": [
                {
                    "target": "com.amazonaws.sso#GetRoleCredentials"
                },
                {
                    "target": "com.amazonaws.sso#ListAccountRoles"
                },
                {
                    "target": "com.amazonaws.sso#ListAccounts"
                },
                {
                    "target": "com.amazonaws.sso#Logout"
                }
            ],
            "traits": {
                "aws.api#service": {
                    "sdkId": "SSO",
                    "arnNamespace": "awsssoportal",
                    "cloudFormationName": "SSO",
                    "cloudTrailEventSource": "sso.amazonaws.com",
                    "endpointPrefix": "portal.sso"
                },
                "aws.auth#sigv4": {
                    "name": "awsssoportal"
                },
                "aws.protocols#restJson1": {},
                "smithy.api#documentation": "<p>AWS Single Sign-On Portal is a web service that makes it easy for you to assign user\n      access to AWS SSO resources such as the user portal. Users can get AWS account applications\n      and roles assigned to them and get federated into the application.</p>\n    \n         <p>For general information about AWS SSO, see <a href=\"https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html\">What is AWS\n        Single Sign-On?</a> in the <i>AWS SSO User Guide</i>.</p>\n    \n         <p>This API reference guide describes the AWS SSO Portal operations that you can call\n      programatically and includes detailed information on data types and errors.</p>\n    \n         <note>\n            <p>AWS provides SDKs that consist of libraries and sample code for various programming\n        languages and platforms, such as Java, Ruby, .Net, iOS, or Android. The SDKs provide a\n        convenient way to create programmatic access to AWS SSO and other AWS services. For more\n        information about the AWS SDKs, including how to download and install them, see <a href=\"http://aws.amazon.com/tools/\">Tools for Amazon Web Services</a>.</p>\n         </note>",
                "smithy.api#title": "AWS Single Sign-On"
            }
        },
        "com.amazonaws.sso#SecretAccessKeyType": {
            "type": "string",
            "traits": {
                "smithy.api#sensitive": {}
            }
        },
        "com.amazonaws.sso#SessionTokenType": {
            "type": "string",
            "traits": {
                "smithy.api#sensitive": {}
            }
        },
        "com.amazonaws.sso#TooManyRequestsException": {
            "type": "structure",
            "members": {
                "message": {
                    "target": "com.amazonaws.sso#ErrorDescription"
                }
            },
            "traits": {
                "smithy.api#documentation": "<p>Indicates that the request is being made too frequently and is more than what the server can handle.</p>",
                "smithy.api#error": "client",
                "smithy.api#httpError": 429
            }
        },
        "com.amazonaws.sso#UnauthorizedException": {
            "type": "structure",
            "members": {
                "message": {
                    "target": "com.amazonaws.sso#ErrorDescription"
                }
            },
            "traits": {
                "smithy.api#documentation": "<p>Indicates that the request is not authorized. This can happen due to an invalid access token in the request.</p>",
                "smithy.api#error": "client",
                "smithy.api#httpError": 401
            }
        }
    }
}
