{
  "version":"2.0",
  "metadata":{
    "apiVersion":"2018-05-10",
    "auth":["smithy.api#httpBearerAuth"],
    "endpointPrefix":"account-access-runtime",
    "protocol":"rest-json",
    "protocols":["rest-json"],
    "serviceFullName":"Account Access Runtime",
    "serviceId":"Account Access Runtime",
    "signatureVersion":"bearer",
    "signingName":"account-access",
    "uid":"account-access-runtime-2018-05-10"
  },
  "operations":{
    "GetRoleCredentials":{
      "name":"GetRoleCredentials",
      "http":{
        "method":"GET",
        "requestUri":"/access/credentials",
        "responseCode":200
      },
      "input":{"shape":"GetRoleCredentialsRequest"},
      "output":{"shape":"GetRoleCredentialsResponse"},
      "errors":[
        {"shape":"AccessDeniedException"},
        {"shape":"ThrottlingException"},
        {"shape":"UnauthorizedException"},
        {"shape":"ValidationException"},
        {"shape":"InternalServerException"}
      ],
      "readonly":true
    },
    "ListRoles":{
      "name":"ListRoles",
      "http":{
        "method":"GET",
        "requestUri":"/access",
        "responseCode":200
      },
      "input":{"shape":"ListRolesRequest"},
      "output":{"shape":"ListRolesResponse"},
      "errors":[
        {"shape":"ThrottlingException"},
        {"shape":"UnauthorizedException"},
        {"shape":"ValidationException"},
        {"shape":"InternalServerException"}
      ],
      "readonly":true
    }
  },
  "shapes":{
    "AccessDeniedException":{
      "type":"structure",
      "required":["message"],
      "members":{
        "message":{"shape":"String"}
      },
      "error":{
        "httpStatusCode":403,
        "senderFault":true
      },
      "exception":true
    },
    "AccessDetails":{
      "type":"structure",
      "required":[
        "accountId",
        "roleArn"
      ],
      "members":{
        "accountId":{"shape":"Account"},
        "accountName":{"shape":"String"},
        "roleArn":{"shape":"String"}
      }
    },
    "AccessDetailsList":{
      "type":"list",
      "member":{"shape":"AccessDetails"}
    },
    "AccessType":{
      "type":"string",
      "enum":["PROGRAMMATIC_ACCESS"]
    },
    "Account":{
      "type":"string",
      "pattern":"[0-9]{12}"
    },
    "CredentialsDetails":{
      "type":"structure",
      "members":{
        "programmaticAccess":{"shape":"ProgrammaticAccessDetails"}
      },
      "sensitive":true,
      "union":true
    },
    "GetRoleCredentialsRequest":{
      "type":"structure",
      "required":[
        "tenantId",
        "roleArn",
        "accessType"
      ],
      "members":{
        "tenantId":{
          "shape":"TenantId",
          "location":"querystring",
          "locationName":"tenantId"
        },
        "roleArn":{
          "shape":"String",
          "location":"querystring",
          "locationName":"roleArn"
        },
        "accessType":{
          "shape":"AccessType",
          "location":"querystring",
          "locationName":"accessType"
        },
        "sessionName":{
          "shape":"SessionName",
          "location":"querystring",
          "locationName":"sessionName"
        },
        "sessionDuration":{
          "shape":"Integer",
          "location":"querystring",
          "locationName":"sessionDuration"
        }
      }
    },
    "GetRoleCredentialsResponse":{
      "type":"structure",
      "members":{
        "credentialsDetails":{"shape":"CredentialsDetails"}
      }
    },
    "Integer":{
      "type":"integer",
      "box":true
    },
    "InternalServerException":{
      "type":"structure",
      "required":["message"],
      "members":{
        "message":{"shape":"String"}
      },
      "exception":true,
      "fault":true
    },
    "ListRolesRequest":{
      "type":"structure",
      "required":["tenantId"],
      "members":{
        "tenantId":{
          "shape":"TenantId",
          "location":"querystring",
          "locationName":"tenantId"
        },
        "maxResults":{
          "shape":"Integer",
          "location":"querystring",
          "locationName":"maxResults"
        },
        "nextToken":{
          "shape":"Token",
          "location":"querystring",
          "locationName":"nextToken"
        }
      }
    },
    "ListRolesResponse":{
      "type":"structure",
      "required":["roles"],
      "members":{
        "roles":{"shape":"AccessDetailsList"},
        "nextToken":{"shape":"String"}
      }
    },
    "ProgrammaticAccessDetails":{
      "type":"structure",
      "required":[
        "accessKeyId",
        "secretAccessKey",
        "sessionToken",
        "expiresAt"
      ],
      "members":{
        "accessKeyId":{"shape":"String"},
        "secretAccessKey":{"shape":"String"},
        "sessionToken":{"shape":"String"},
        "expiresAt":{"shape":"Timestamp"}
      },
      "sensitive":true
    },
    "SessionName":{
      "type":"string",
      "pattern":"[a-zA-Z0-9_+=,.@-]{2,64}"
    },
    "String":{"type":"string"},
    "TenantId":{
      "type":"string",
      "max":24,
      "min":3,
      "pattern":"[a-z0-9-]+"
    },
    "ThrottlingException":{
      "type":"structure",
      "required":["message"],
      "members":{
        "message":{"shape":"String"}
      },
      "error":{
        "httpStatusCode":429,
        "senderFault":true
      },
      "exception":true
    },
    "Timestamp":{"type":"timestamp"},
    "Token":{"type":"string"},
    "UnauthorizedException":{
      "type":"structure",
      "required":["message"],
      "members":{
        "message":{"shape":"String"}
      },
      "error":{
        "httpStatusCode":401,
        "senderFault":true
      },
      "exception":true
    },
    "ValidationException":{
      "type":"structure",
      "required":["message"],
      "members":{
        "message":{"shape":"String"}
      },
      "error":{
        "httpStatusCode":400,
        "senderFault":true
      },
      "exception":true
    }
  }
}
