{
  "typeName" : "AWS::QuickSight::ActionConnector",
  "description" : "Definition of the AWS::QuickSight::ActionConnector Resource Type.",
  "definitions" : {
    "APIKeyConnectionMetadata" : {
      "type" : "object",
      "properties" : {
        "BaseEndpoint" : {
          "type" : "string",
          "maxLength" : 8192,
          "minLength" : 1,
          "pattern" : "^https://.*"
        },
        "ApiKey" : {
          "type" : "string"
        },
        "Email" : {
          "type" : "string",
          "pattern" : "^[\\w.%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}$"
        }
      },
      "required" : [ "ApiKey", "BaseEndpoint" ],
      "additionalProperties" : false
    },
    "ActionConnectorType" : {
      "type" : "string",
      "enum" : [ "GENERIC_HTTP", "SERVICENOW_NOW_PLATFORM", "SALESFORCE_CRM", "MICROSOFT_OUTLOOK", "PAGERDUTY_ADVANCE", "JIRA_CLOUD", "ATLASSIAN_CONFLUENCE", "AMAZON_S3", "AMAZON_BEDROCK_AGENT_RUNTIME", "AMAZON_BEDROCK_RUNTIME", "AMAZON_BEDROCK_DATA_AUTOMATION_RUNTIME", "AMAZON_TEXTRACT", "AMAZON_COMPREHEND", "AMAZON_COMPREHEND_MEDICAL", "MICROSOFT_ONEDRIVE", "MICROSOFT_SHAREPOINT", "MICROSOFT_TEAMS", "SAP_BUSINESSPARTNER", "SAP_PRODUCTMASTERDATA", "SAP_PHYSICALINVENTORY", "SAP_BILLOFMATERIALS", "SAP_MATERIALSTOCK", "ZENDESK_SUITE", "SMARTSHEET", "SLACK", "ASANA", "BAMBOO_HR" ]
    },
    "AuthConfig" : {
      "type" : "object",
      "properties" : {
        "AuthenticationType" : {
          "$ref" : "#/definitions/ConnectionAuthType"
        },
        "AuthenticationMetadata" : {
          "$ref" : "#/definitions/AuthenticationMetadata"
        }
      },
      "required" : [ "AuthenticationMetadata", "AuthenticationType" ],
      "additionalProperties" : false
    },
    "AuthenticationMetadata" : {
      "oneOf" : [ {
        "type" : "object",
        "title" : "AuthorizationCodeGrantMetadata",
        "properties" : {
          "AuthorizationCodeGrantMetadata" : {
            "$ref" : "#/definitions/AuthorizationCodeGrantMetadata"
          }
        },
        "required" : [ "AuthorizationCodeGrantMetadata" ],
        "additionalProperties" : false
      }, {
        "type" : "object",
        "title" : "ClientCredentialsGrantMetadata",
        "properties" : {
          "ClientCredentialsGrantMetadata" : {
            "$ref" : "#/definitions/ClientCredentialsGrantMetadata"
          }
        },
        "required" : [ "ClientCredentialsGrantMetadata" ],
        "additionalProperties" : false
      }, {
        "type" : "object",
        "title" : "BasicAuthConnectionMetadata",
        "properties" : {
          "BasicAuthConnectionMetadata" : {
            "$ref" : "#/definitions/BasicAuthConnectionMetadata"
          }
        },
        "required" : [ "BasicAuthConnectionMetadata" ],
        "additionalProperties" : false
      }, {
        "type" : "object",
        "title" : "ApiKeyConnectionMetadata",
        "properties" : {
          "ApiKeyConnectionMetadata" : {
            "$ref" : "#/definitions/APIKeyConnectionMetadata"
          }
        },
        "required" : [ "ApiKeyConnectionMetadata" ],
        "additionalProperties" : false
      }, {
        "type" : "object",
        "title" : "NoneConnectionMetadata",
        "properties" : {
          "NoneConnectionMetadata" : {
            "$ref" : "#/definitions/NoneConnectionMetadata"
          }
        },
        "required" : [ "NoneConnectionMetadata" ],
        "additionalProperties" : false
      }, {
        "type" : "object",
        "title" : "IamConnectionMetadata",
        "properties" : {
          "IamConnectionMetadata" : {
            "$ref" : "#/definitions/IAMConnectionMetadata"
          }
        },
        "required" : [ "IamConnectionMetadata" ],
        "additionalProperties" : false
      } ]
    },
    "AuthorizationCodeGrantCredentialsDetails" : {
      "oneOf" : [ {
        "type" : "object",
        "title" : "AuthorizationCodeGrantDetails",
        "properties" : {
          "AuthorizationCodeGrantDetails" : {
            "$ref" : "#/definitions/AuthorizationCodeGrantDetails"
          }
        },
        "required" : [ "AuthorizationCodeGrantDetails" ],
        "additionalProperties" : false
      } ]
    },
    "AuthorizationCodeGrantCredentialsSource" : {
      "type" : "string",
      "enum" : [ "PLAIN_CREDENTIALS" ]
    },
    "AuthorizationCodeGrantDetails" : {
      "type" : "object",
      "properties" : {
        "ClientId" : {
          "type" : "string",
          "maxLength" : 1024
        },
        "ClientSecret" : {
          "type" : "string",
          "maxLength" : 2048
        },
        "TokenEndpoint" : {
          "type" : "string",
          "maxLength" : 8192,
          "minLength" : 1,
          "pattern" : "^https://.*"
        },
        "AuthorizationEndpoint" : {
          "type" : "string",
          "maxLength" : 8192,
          "minLength" : 1,
          "pattern" : "^https://.*"
        }
      },
      "required" : [ "AuthorizationEndpoint", "ClientId", "ClientSecret", "TokenEndpoint" ],
      "additionalProperties" : false
    },
    "AuthorizationCodeGrantMetadata" : {
      "type" : "object",
      "properties" : {
        "BaseEndpoint" : {
          "type" : "string",
          "maxLength" : 8192,
          "minLength" : 1,
          "pattern" : "^https://.*"
        },
        "RedirectUrl" : {
          "type" : "string",
          "maxLength" : 8192,
          "minLength" : 1,
          "pattern" : "^https://.*"
        },
        "AuthorizationCodeGrantCredentialsSource" : {
          "$ref" : "#/definitions/AuthorizationCodeGrantCredentialsSource"
        },
        "AuthorizationCodeGrantCredentialsDetails" : {
          "$ref" : "#/definitions/AuthorizationCodeGrantCredentialsDetails"
        }
      },
      "required" : [ "BaseEndpoint", "RedirectUrl" ],
      "additionalProperties" : false
    },
    "BasicAuthConnectionMetadata" : {
      "type" : "object",
      "properties" : {
        "BaseEndpoint" : {
          "type" : "string",
          "maxLength" : 8192,
          "minLength" : 1,
          "pattern" : "^https://.*"
        },
        "Username" : {
          "type" : "string"
        },
        "Password" : {
          "type" : "string"
        }
      },
      "required" : [ "BaseEndpoint", "Password", "Username" ],
      "additionalProperties" : false
    },
    "ClientCredentialsDetails" : {
      "oneOf" : [ {
        "type" : "object",
        "title" : "ClientCredentialsGrantDetails",
        "properties" : {
          "ClientCredentialsGrantDetails" : {
            "$ref" : "#/definitions/ClientCredentialsGrantDetails"
          }
        },
        "required" : [ "ClientCredentialsGrantDetails" ],
        "additionalProperties" : false
      } ]
    },
    "ClientCredentialsGrantDetails" : {
      "type" : "object",
      "properties" : {
        "ClientId" : {
          "type" : "string",
          "maxLength" : 1024
        },
        "ClientSecret" : {
          "type" : "string",
          "maxLength" : 2048
        },
        "TokenEndpoint" : {
          "type" : "string",
          "maxLength" : 8192,
          "minLength" : 1,
          "pattern" : "^https://.*"
        }
      },
      "required" : [ "ClientId", "ClientSecret", "TokenEndpoint" ],
      "additionalProperties" : false
    },
    "ClientCredentialsGrantMetadata" : {
      "type" : "object",
      "properties" : {
        "BaseEndpoint" : {
          "type" : "string",
          "maxLength" : 8192,
          "minLength" : 1,
          "pattern" : "^https://.*"
        },
        "ClientCredentialsSource" : {
          "$ref" : "#/definitions/ClientCredentialsSource"
        },
        "ClientCredentialsDetails" : {
          "$ref" : "#/definitions/ClientCredentialsDetails"
        }
      },
      "required" : [ "BaseEndpoint" ],
      "additionalProperties" : false
    },
    "ClientCredentialsSource" : {
      "type" : "string",
      "enum" : [ "PLAIN_CREDENTIALS" ]
    },
    "ConnectionAuthType" : {
      "type" : "string",
      "enum" : [ "BASIC", "API_KEY", "OAUTH2_CLIENT_CREDENTIALS", "NONE", "IAM", "OAUTH2_AUTHORIZATION_CODE" ]
    },
    "IAMConnectionMetadata" : {
      "type" : "object",
      "properties" : {
        "RoleArn" : {
          "type" : "string",
          "maxLength" : 2048,
          "minLength" : 20
        }
      },
      "required" : [ "RoleArn" ],
      "additionalProperties" : false
    },
    "NoneConnectionMetadata" : {
      "type" : "object",
      "properties" : {
        "BaseEndpoint" : {
          "type" : "string",
          "maxLength" : 8192,
          "minLength" : 1,
          "pattern" : "^https://.*"
        }
      },
      "required" : [ "BaseEndpoint" ],
      "additionalProperties" : false
    },
    "ResourcePermission" : {
      "type" : "object",
      "description" : "<p>Permission for the resource.</p>",
      "properties" : {
        "Principal" : {
          "type" : "string",
          "maxLength" : 256,
          "minLength" : 1,
          "description" : "<p>The Amazon Resource Name (ARN) of the principal. This can be one of the\n            following:</p>\n         <ul>\n            <li>\n               <p>The ARN of an Amazon QuickSight user or group associated with a data source or dataset. (This is common.)</p>\n            </li>\n            <li>\n               <p>The ARN of an Amazon QuickSight user, group, or namespace associated with an analysis, dashboard, template, or theme. (This is common.)</p>\n            </li>\n            <li>\n               <p>The ARN of an Amazon Web Services account root: This is an IAM ARN rather than a QuickSight\n                    ARN. Use this option only to share resources (templates) across Amazon Web Services accounts.\n                    (This is less common.) </p>\n            </li>\n         </ul>"
        },
        "Actions" : {
          "type" : "array",
          "items" : {
            "type" : "string"
          },
          "maxItems" : 30,
          "minItems" : 1,
          "description" : "<p>The IAM action to grant or revoke permissions on.</p>"
        }
      },
      "required" : [ "Actions", "Principal" ],
      "additionalProperties" : false
    },
    "ResourceStatus" : {
      "type" : "string",
      "enum" : [ "CREATION_IN_PROGRESS", "CREATION_SUCCESSFUL", "CREATION_FAILED", "UPDATE_IN_PROGRESS", "UPDATE_SUCCESSFUL", "UPDATE_FAILED", "PENDING_UPDATE", "DELETED" ]
    },
    "Tag" : {
      "type" : "object",
      "description" : "<p>The key or keys of the key-value pairs for the resource tag or tags assigned to the\n            resource.</p>",
      "properties" : {
        "Key" : {
          "type" : "string",
          "maxLength" : 128,
          "minLength" : 1,
          "description" : "<p>Tag key.</p>"
        },
        "Value" : {
          "type" : "string",
          "maxLength" : 256,
          "minLength" : 1,
          "description" : "<p>Tag value.</p>"
        }
      },
      "required" : [ "Key", "Value" ],
      "additionalProperties" : false
    }
  },
  "properties" : {
    "ActionConnectorId" : {
      "type" : "string",
      "maxLength" : 512,
      "minLength" : 1,
      "pattern" : "^[\\w\\-]+$"
    },
    "Arn" : {
      "type" : "string"
    },
    "AuthenticationConfig" : {
      "$ref" : "#/definitions/AuthConfig"
    },
    "AwsAccountId" : {
      "type" : "string",
      "maxLength" : 12,
      "minLength" : 12,
      "pattern" : "^[0-9]{12}$"
    },
    "CreatedTime" : {
      "type" : "string",
      "format" : "date-time"
    },
    "Description" : {
      "type" : "string",
      "maxLength" : 2048,
      "minLength" : 1,
      "pattern" : "^[A-Za-z0-9 _.,!?-]*$"
    },
    "EnabledActions" : {
      "type" : "array",
      "items" : {
        "type" : "string",
        "pattern" : "^[\\w@:_.,!?+-/]+$"
      },
      "maxItems" : 100
    },
    "LastUpdatedTime" : {
      "type" : "string",
      "format" : "date-time"
    },
    "Name" : {
      "type" : "string",
      "maxLength" : 255,
      "minLength" : 1,
      "pattern" : "^[A-Za-z0-9](?:[\\w- ]*[A-Za-z0-9])?$"
    },
    "Permissions" : {
      "type" : "array",
      "items" : {
        "$ref" : "#/definitions/ResourcePermission"
      },
      "maxItems" : 64,
      "minItems" : 1
    },
    "Status" : {
      "$ref" : "#/definitions/ResourceStatus"
    },
    "Tags" : {
      "type" : "array",
      "items" : {
        "$ref" : "#/definitions/Tag"
      },
      "maxItems" : 200,
      "minItems" : 1
    },
    "Type" : {
      "$ref" : "#/definitions/ActionConnectorType"
    },
    "VpcConnectionArn" : {
      "type" : "string"
    }
  },
  "required" : [ "ActionConnectorId", "AuthenticationConfig", "AwsAccountId", "Name", "Type" ],
  "readOnlyProperties" : [ "/properties/Arn", "/properties/CreatedTime", "/properties/EnabledActions", "/properties/LastUpdatedTime", "/properties/Status" ],
  "writeOnlyProperties" : [ "/properties/AuthenticationConfig", "/properties/VpcConnectionArn" ],
  "createOnlyProperties" : [ "/properties/ActionConnectorId", "/properties/AwsAccountId", "/properties/Type" ],
  "primaryIdentifier" : [ "/properties/ActionConnectorId", "/properties/AwsAccountId" ],
  "handlers" : {
    "create" : {
      "permissions" : [ "quicksight:CreateActionConnector", "quicksight:DescribeActionConnector", "quicksight:DescribeActionConnectorPermissions", "quicksight:TagResource", "quicksight:ListTagsForResource", "iam:PassRole" ]
    },
    "read" : {
      "permissions" : [ "quicksight:DescribeActionConnector", "quicksight:DescribeActionConnectorPermissions", "quicksight:ListTagsForResource" ]
    },
    "update" : {
      "permissions" : [ "quicksight:DescribeActionConnector", "quicksight:DescribeActionConnectorPermissions", "quicksight:UpdateActionConnector", "quicksight:UpdateActionConnectorPermissions", "quicksight:TagResource", "quicksight:UntagResource", "quicksight:ListTagsForResource", "iam:PassRole" ]
    },
    "delete" : {
      "permissions" : [ "quicksight:DescribeActionConnector", "quicksight:DeleteActionConnector" ]
    },
    "list" : {
      "permissions" : [ "quicksight:ListActionConnectors" ]
    }
  },
  "additionalProperties" : false,
  "tagging" : {
    "taggable" : true,
    "tagOnCreate" : true,
    "tagUpdatable" : true,
    "cloudFormationSystemTags" : false,
    "tagProperty" : "/properties/Tags",
    "permissions" : [ "quicksight:TagResource", "quicksight:UntagResource", "quicksight:ListTagsForResource" ]
  }
}