{
  "version":"2.0",
  "metadata":{
    "apiVersion":"2018-05-10",
    "auth":["aws.auth#sigv4"],
    "endpointPrefix":"account-access",
    "protocol":"rest-json",
    "protocols":["rest-json"],
    "serviceFullName":"Account Access",
    "serviceId":"Account Access",
    "signatureVersion":"v4",
    "signingName":"account-access",
    "uid":"account-access-2018-05-10"
  },
  "operations":{
    "CreateApplication":{
      "name":"CreateApplication",
      "http":{
        "method":"POST",
        "requestUri":"/applications",
        "responseCode":200
      },
      "input":{"shape":"CreateApplicationRequest"},
      "output":{"shape":"CreateApplicationResponse"},
      "errors":[
        {"shape":"AlreadyCreatedException"},
        {"shape":"AccessDeniedException"},
        {"shape":"ThrottlingException"},
        {"shape":"ConflictException"},
        {"shape":"ValidationException"},
        {"shape":"InternalServerException"}
      ],
      "idempotent":true
    },
    "CreateEntitlement":{
      "name":"CreateEntitlement",
      "http":{
        "method":"POST",
        "requestUri":"/entitlements",
        "responseCode":200
      },
      "input":{"shape":"CreateEntitlementRequest"},
      "output":{"shape":"CreateEntitlementResponse"},
      "errors":[
        {"shape":"AccessDeniedException"},
        {"shape":"ResourceNotFoundException"},
        {"shape":"ThrottlingException"},
        {"shape":"ConflictException"},
        {"shape":"ValidationException"},
        {"shape":"ServiceQuotaExceededException"},
        {"shape":"InternalServerException"}
      ],
      "idempotent":true
    },
    "DeleteApplication":{
      "name":"DeleteApplication",
      "http":{
        "method":"DELETE",
        "requestUri":"/applications/{applicationArn}",
        "responseCode":204
      },
      "input":{"shape":"DeleteApplicationRequest"},
      "output":{"shape":"DeleteApplicationResponse"},
      "errors":[
        {"shape":"AccessDeniedException"},
        {"shape":"ResourceNotFoundException"},
        {"shape":"ThrottlingException"},
        {"shape":"ConflictException"},
        {"shape":"ValidationException"},
        {"shape":"InternalServerException"}
      ],
      "idempotent":true
    },
    "DeleteEntitlement":{
      "name":"DeleteEntitlement",
      "http":{
        "method":"DELETE",
        "requestUri":"/entitlements/{entitlementId}",
        "responseCode":204
      },
      "input":{"shape":"DeleteEntitlementRequest"},
      "output":{"shape":"DeleteEntitlementResponse"},
      "errors":[
        {"shape":"AccessDeniedException"},
        {"shape":"ResourceNotFoundException"},
        {"shape":"ThrottlingException"},
        {"shape":"ConflictException"},
        {"shape":"ValidationException"},
        {"shape":"InternalServerException"}
      ],
      "idempotent":true
    },
    "GetApplication":{
      "name":"GetApplication",
      "http":{
        "method":"GET",
        "requestUri":"/applications/{applicationArn}",
        "responseCode":200
      },
      "input":{"shape":"GetApplicationRequest"},
      "output":{"shape":"GetApplicationResponse"},
      "errors":[
        {"shape":"AccessDeniedException"},
        {"shape":"ResourceNotFoundException"},
        {"shape":"ThrottlingException"},
        {"shape":"ValidationException"},
        {"shape":"InternalServerException"}
      ],
      "readonly":true
    },
    "GetEntitlement":{
      "name":"GetEntitlement",
      "http":{
        "method":"GET",
        "requestUri":"/entitlements/{entitlementId}",
        "responseCode":200
      },
      "input":{"shape":"GetEntitlementRequest"},
      "output":{"shape":"GetEntitlementResponse"},
      "errors":[
        {"shape":"AccessDeniedException"},
        {"shape":"ResourceNotFoundException"},
        {"shape":"ThrottlingException"},
        {"shape":"ValidationException"},
        {"shape":"InternalServerException"}
      ],
      "readonly":true
    },
    "ListApplications":{
      "name":"ListApplications",
      "http":{
        "method":"POST",
        "requestUri":"/applications-list",
        "responseCode":200
      },
      "input":{"shape":"ListApplicationsRequest"},
      "output":{"shape":"ListApplicationsResponse"},
      "errors":[
        {"shape":"AccessDeniedException"},
        {"shape":"ThrottlingException"},
        {"shape":"ValidationException"},
        {"shape":"InternalServerException"}
      ],
      "readonly":true
    },
    "ListEntitlements":{
      "name":"ListEntitlements",
      "http":{
        "method":"POST",
        "requestUri":"/entitlements-list",
        "responseCode":200
      },
      "input":{"shape":"ListEntitlementsRequest"},
      "output":{"shape":"ListEntitlementsResponse"},
      "errors":[
        {"shape":"AccessDeniedException"},
        {"shape":"ResourceNotFoundException"},
        {"shape":"ThrottlingException"},
        {"shape":"ValidationException"},
        {"shape":"InternalServerException"}
      ],
      "readonly":true
    },
    "ListTagsForResource":{
      "name":"ListTagsForResource",
      "http":{
        "method":"GET",
        "requestUri":"/tags/{resourceArn}",
        "responseCode":200
      },
      "input":{"shape":"ListTagsForResourceRequest"},
      "output":{"shape":"ListTagsForResourceResponse"},
      "errors":[
        {"shape":"ResourceNotFoundException"},
        {"shape":"ThrottlingException"},
        {"shape":"ValidationException"},
        {"shape":"InternalServerException"}
      ],
      "readonly":true
    },
    "TagResource":{
      "name":"TagResource",
      "http":{
        "method":"POST",
        "requestUri":"/tags/{resourceArn}",
        "responseCode":200
      },
      "input":{"shape":"TagResourceRequest"},
      "output":{"shape":"TagResourceResponse"},
      "errors":[
        {"shape":"ResourceNotFoundException"},
        {"shape":"ThrottlingException"},
        {"shape":"ValidationException"},
        {"shape":"InternalServerException"}
      ]
    },
    "UntagResource":{
      "name":"UntagResource",
      "http":{
        "method":"DELETE",
        "requestUri":"/tags/{resourceArn}",
        "responseCode":200
      },
      "input":{"shape":"UntagResourceRequest"},
      "output":{"shape":"UntagResourceResponse"},
      "errors":[
        {"shape":"ResourceNotFoundException"},
        {"shape":"ThrottlingException"},
        {"shape":"ValidationException"},
        {"shape":"InternalServerException"}
      ],
      "idempotent":true
    }
  },
  "shapes":{
    "AccessDeniedException":{
      "type":"structure",
      "members":{
        "message":{"shape":"String"}
      },
      "error":{
        "httpStatusCode":403,
        "senderFault":true
      },
      "exception":true
    },
    "Account":{
      "type":"string",
      "max":12,
      "min":12,
      "pattern":"[0-9]{12}"
    },
    "AlreadyCreatedException":{
      "type":"structure",
      "members":{
        "message":{"shape":"String"}
      },
      "exception":true
    },
    "ApplicationArn":{
      "type":"string",
      "max":2048,
      "min":49,
      "pattern":"arn:[a-z0-9-]+:account-access:[a-z0-9]+(-[a-z0-9]+)*:[0-9]{12}:application/[a-zA-Z0-9-]+"
    },
    "ApplicationList":{
      "type":"list",
      "member":{"shape":"ApplicationSummary"}
    },
    "ApplicationSummary":{
      "type":"structure",
      "required":[
        "applicationArn",
        "createdAt",
        "updatedAt"
      ],
      "members":{
        "applicationArn":{"shape":"ApplicationArn"},
        "tenantId":{"shape":"String"},
        "createdAt":{"shape":"DateTime"},
        "updatedAt":{"shape":"DateTime"}
      }
    },
    "ConflictException":{
      "type":"structure",
      "members":{
        "message":{"shape":"String"}
      },
      "error":{
        "httpStatusCode":409,
        "senderFault":true
      },
      "exception":true
    },
    "CreateApplicationRequest":{
      "type":"structure",
      "required":["identitySource"],
      "members":{
        "identitySource":{"shape":"IdentitySource"},
        "tags":{"shape":"TagsMap"}
      }
    },
    "CreateApplicationResponse":{
      "type":"structure",
      "required":["applicationArn"],
      "members":{
        "applicationArn":{"shape":"ApplicationArn"}
      }
    },
    "CreateEntitlementRequest":{
      "type":"structure",
      "required":[
        "applicationArn",
        "entitlement"
      ],
      "members":{
        "applicationArn":{"shape":"ApplicationArn"},
        "entitlement":{"shape":"Entitlement"}
      }
    },
    "CreateEntitlementResponse":{
      "type":"structure",
      "required":["entitlementId"],
      "members":{
        "entitlementId":{"shape":"String"}
      }
    },
    "DateTime":{
      "type":"timestamp",
      "timestampFormat":"iso8601"
    },
    "DeleteApplicationRequest":{
      "type":"structure",
      "required":["applicationArn"],
      "members":{
        "applicationArn":{
          "shape":"ApplicationArn",
          "location":"uri",
          "locationName":"applicationArn"
        }
      }
    },
    "DeleteApplicationResponse":{
      "type":"structure",
      "members":{}
    },
    "DeleteEntitlementRequest":{
      "type":"structure",
      "required":[
        "applicationArn",
        "entitlementId"
      ],
      "members":{
        "applicationArn":{
          "shape":"ApplicationArn",
          "location":"querystring",
          "locationName":"applicationArn"
        },
        "entitlementId":{
          "shape":"String",
          "location":"uri",
          "locationName":"entitlementId"
        }
      }
    },
    "DeleteEntitlementResponse":{
      "type":"structure",
      "members":{}
    },
    "Entitlement":{
      "type":"structure",
      "members":{
        "principalRole":{"shape":"PrincipalRoleEntitlement"}
      },
      "union":true
    },
    "EntitlementDetails":{
      "type":"structure",
      "members":{
        "principalRole":{"shape":"PrincipalRoleEntitlementDetails"}
      },
      "union":true
    },
    "EntitlementFilter":{
      "type":"structure",
      "members":{
        "principalRole":{"shape":"PrincipalRoleEntitlementFilter"}
      }
    },
    "EntitlementSummary":{
      "type":"structure",
      "members":{
        "principalRole":{"shape":"PrincipalRoleEntitlementSummary"}
      },
      "union":true
    },
    "EntitlementsList":{
      "type":"list",
      "member":{"shape":"EntitlementsListMember"}
    },
    "EntitlementsListMember":{
      "type":"structure",
      "required":[
        "entitlementId",
        "entitlement",
        "createdAt"
      ],
      "members":{
        "entitlementId":{"shape":"String"},
        "entitlement":{"shape":"EntitlementSummary"},
        "createdAt":{"shape":"DateTime"}
      }
    },
    "ErrorCode":{
      "type":"string",
      "enum":[
        "AUTHORIZATION_ERROR",
        "RESOURCE_NOT_FOUND_ERROR",
        "SERVICE_QUOTA_EXCEEDED_ERROR",
        "INTERNAL_SERVICE_ERROR"
      ]
    },
    "ErrorDetails":{
      "type":"structure",
      "required":[
        "code",
        "message"
      ],
      "members":{
        "code":{"shape":"ErrorCode"},
        "message":{"shape":"String"}
      }
    },
    "GetApplicationRequest":{
      "type":"structure",
      "required":["applicationArn"],
      "members":{
        "applicationArn":{
          "shape":"ApplicationArn",
          "location":"uri",
          "locationName":"applicationArn"
        }
      }
    },
    "GetApplicationResponse":{
      "type":"structure",
      "required":[
        "identitySource",
        "status",
        "createdAt",
        "updatedAt"
      ],
      "members":{
        "identitySource":{"shape":"IdentitySourceDetails"},
        "status":{"shape":"Status"},
        "tenantId":{"shape":"String"},
        "createdAt":{"shape":"DateTime"},
        "updatedAt":{"shape":"DateTime"},
        "tags":{"shape":"TagsMap"},
        "error":{"shape":"ErrorDetails"}
      }
    },
    "GetEntitlementRequest":{
      "type":"structure",
      "required":[
        "applicationArn",
        "entitlementId"
      ],
      "members":{
        "applicationArn":{
          "shape":"ApplicationArn",
          "location":"querystring",
          "locationName":"applicationArn"
        },
        "entitlementId":{
          "shape":"String",
          "location":"uri",
          "locationName":"entitlementId"
        }
      }
    },
    "GetEntitlementResponse":{
      "type":"structure",
      "required":[
        "applicationArn",
        "entitlementId",
        "entitlement",
        "createdAt"
      ],
      "members":{
        "applicationArn":{"shape":"ApplicationArn"},
        "entitlementId":{"shape":"String"},
        "entitlement":{"shape":"EntitlementDetails"},
        "createdAt":{"shape":"DateTime"}
      }
    },
    "GroupId":{
      "type":"string",
      "max":47,
      "min":1,
      "pattern":"([0-9a-f]{10}-|)[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}"
    },
    "IdentityCenter":{
      "type":"structure",
      "required":["instanceArn"],
      "members":{
        "instanceArn":{"shape":"IdentityCenterInstanceArn"}
      }
    },
    "IdentityCenterApplicationArn":{
      "type":"string",
      "max":1224,
      "min":10,
      "pattern":"arn:[a-z0-9-]+:sso::[0-9]{12}:application/(sso)?ins-[a-zA-Z0-9-.]{16}/apl-[a-zA-Z0-9]{16}"
    },
    "IdentityCenterDetails":{
      "type":"structure",
      "required":["instanceArn"],
      "members":{
        "instanceArn":{"shape":"IdentityCenterInstanceArn"},
        "applicationArn":{"shape":"IdentityCenterApplicationArn"}
      }
    },
    "IdentityCenterInstanceArn":{
      "type":"string",
      "max":1224,
      "min":10,
      "pattern":"arn:[a-z0-9-]+:sso:::instance/(sso)?ins-[a-zA-Z0-9-.]{16}"
    },
    "IdentityCenterPrincipal":{
      "type":"structure",
      "members":{
        "userId":{"shape":"UserId"},
        "groupId":{"shape":"GroupId"}
      },
      "union":true
    },
    "IdentityCenterPrincipalFilter":{
      "type":"structure",
      "members":{
        "userId":{"shape":"UserId"},
        "groupId":{"shape":"GroupId"}
      },
      "union":true
    },
    "IdentitySource":{
      "type":"structure",
      "members":{
        "identityCenter":{"shape":"IdentityCenter"}
      },
      "union":true
    },
    "IdentitySourceDetails":{
      "type":"structure",
      "members":{
        "identityCenter":{"shape":"IdentityCenterDetails"}
      },
      "union":true
    },
    "InternalServerException":{
      "type":"structure",
      "members":{
        "message":{"shape":"String"}
      },
      "error":{"httpStatusCode":500},
      "exception":true,
      "fault":true
    },
    "ListApplicationsRequest":{
      "type":"structure",
      "members":{
        "maxResults":{"shape":"ListApplicationsRequestMaxResultsInteger"},
        "nextToken":{"shape":"String"}
      }
    },
    "ListApplicationsRequestMaxResultsInteger":{
      "type":"integer",
      "box":true,
      "max":100,
      "min":1
    },
    "ListApplicationsResponse":{
      "type":"structure",
      "required":["applications"],
      "members":{
        "applications":{"shape":"ApplicationList"},
        "nextToken":{"shape":"String"}
      }
    },
    "ListEntitlementsRequest":{
      "type":"structure",
      "required":[
        "applicationArn",
        "filter"
      ],
      "members":{
        "applicationArn":{"shape":"ApplicationArn"},
        "filter":{"shape":"EntitlementFilter"},
        "nextToken":{"shape":"String"},
        "maxResults":{"shape":"ListEntitlementsRequestMaxResultsInteger"}
      }
    },
    "ListEntitlementsRequestMaxResultsInteger":{
      "type":"integer",
      "box":true,
      "max":100,
      "min":1
    },
    "ListEntitlementsResponse":{
      "type":"structure",
      "required":["entitlements"],
      "members":{
        "entitlements":{"shape":"EntitlementsList"},
        "nextToken":{"shape":"String"}
      }
    },
    "ListTagsForResourceRequest":{
      "type":"structure",
      "required":["resourceArn"],
      "members":{
        "resourceArn":{
          "shape":"ApplicationArn",
          "location":"uri",
          "locationName":"resourceArn"
        }
      }
    },
    "ListTagsForResourceResponse":{
      "type":"structure",
      "members":{
        "tags":{"shape":"TagsMap"}
      }
    },
    "Principal":{
      "type":"structure",
      "members":{
        "identityCenter":{"shape":"IdentityCenterPrincipal"}
      },
      "union":true
    },
    "PrincipalFilter":{
      "type":"structure",
      "members":{
        "identityCenter":{"shape":"IdentityCenterPrincipalFilter"}
      },
      "union":true
    },
    "PrincipalRoleEntitlement":{
      "type":"structure",
      "required":[
        "principal",
        "roleArn"
      ],
      "members":{
        "principal":{"shape":"Principal"},
        "roleArn":{"shape":"RoleArn"}
      }
    },
    "PrincipalRoleEntitlementDetails":{
      "type":"structure",
      "required":[
        "principal",
        "roleArn",
        "account"
      ],
      "members":{
        "principal":{"shape":"Principal"},
        "roleArn":{"shape":"RoleArn"},
        "account":{"shape":"Account"},
        "accountName":{"shape":"String"}
      }
    },
    "PrincipalRoleEntitlementFilter":{
      "type":"structure",
      "members":{
        "principal":{"shape":"PrincipalFilter"},
        "roleArn":{"shape":"RoleArn"},
        "account":{"shape":"Account"}
      }
    },
    "PrincipalRoleEntitlementSummary":{
      "type":"structure",
      "required":[
        "principal",
        "roleArn",
        "account"
      ],
      "members":{
        "principal":{"shape":"Principal"},
        "roleArn":{"shape":"RoleArn"},
        "account":{"shape":"Account"},
        "accountName":{"shape":"String"}
      }
    },
    "ResourceNotFoundException":{
      "type":"structure",
      "members":{
        "message":{"shape":"String"}
      },
      "error":{
        "httpStatusCode":404,
        "senderFault":true
      },
      "exception":true
    },
    "RoleArn":{
      "type":"string",
      "pattern":"arn:[a-z0-9-]+:iam::[0-9]{12}:role/([a-zA-Z0-9+=,.@_-]+/)*[a-zA-Z0-9+=,.@_-]+"
    },
    "ServiceQuotaExceededException":{
      "type":"structure",
      "members":{
        "message":{"shape":"String"}
      },
      "error":{
        "httpStatusCode":402,
        "senderFault":true
      },
      "exception":true
    },
    "Status":{
      "type":"string",
      "enum":[
        "CREATE_IN_PROGRESS",
        "ACTIVE",
        "DELETE_IN_PROGRESS",
        "CREATE_FAILED",
        "DELETE_FAILED"
      ]
    },
    "String":{"type":"string"},
    "TagKeys":{
      "type":"list",
      "member":{"shape":"String"}
    },
    "TagResourceRequest":{
      "type":"structure",
      "required":[
        "resourceArn",
        "tags"
      ],
      "members":{
        "resourceArn":{
          "shape":"ApplicationArn",
          "location":"uri",
          "locationName":"resourceArn"
        },
        "tags":{"shape":"TagsMap"}
      }
    },
    "TagResourceResponse":{
      "type":"structure",
      "members":{}
    },
    "TagsMap":{
      "type":"map",
      "key":{"shape":"String"},
      "value":{"shape":"String"}
    },
    "ThrottlingException":{
      "type":"structure",
      "members":{
        "message":{"shape":"String"}
      },
      "error":{
        "httpStatusCode":429,
        "senderFault":true
      },
      "exception":true
    },
    "UntagResourceRequest":{
      "type":"structure",
      "required":[
        "resourceArn",
        "tagKeys"
      ],
      "members":{
        "resourceArn":{
          "shape":"ApplicationArn",
          "location":"uri",
          "locationName":"resourceArn"
        },
        "tagKeys":{
          "shape":"TagKeys",
          "location":"querystring",
          "locationName":"tagKeys"
        }
      }
    },
    "UntagResourceResponse":{
      "type":"structure",
      "members":{}
    },
    "UserId":{
      "type":"string",
      "max":47,
      "min":1,
      "pattern":"([0-9a-f]{10}-|)[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}"
    },
    "ValidationException":{
      "type":"structure",
      "members":{
        "message":{"shape":"String"}
      },
      "error":{
        "httpStatusCode":400,
        "senderFault":true
      },
      "exception":true
    }
  }
}
