{
  "service": "aws_s3",
  "displayName": "AWS S3",
  "categories": [
    "Storage",
    "Developer Tools"
  ],
  "authTypes": [
    "custom_credential"
  ],
  "auth": [
    {
      "type": "custom_credential",
      "fields": [
        {
          "key": "accessKeyId",
          "label": "Access Key ID",
          "inputType": "text",
          "required": true,
          "secret": false,
          "placeholder": "AKIA...",
          "description": "AWS access key ID. Create or manage IAM user access keys here: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html"
        },
        {
          "key": "secretAccessKey",
          "label": "Secret Access Key",
          "inputType": "password",
          "required": true,
          "secret": true,
          "placeholder": "Your AWS secret access key",
          "description": "AWS secret access key from the same access key pair. AWS shows it only when you create the access key: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html"
        },
        {
          "key": "region",
          "label": "Region",
          "inputType": "text",
          "required": true,
          "secret": false,
          "placeholder": "us-east-1",
          "description": "The default AWS region used for validation and S3 action execution. See the official S3 endpoints and region list: https://docs.aws.amazon.com/general/latest/gr/s3.html"
        },
        {
          "key": "bucket",
          "label": "Default Bucket",
          "inputType": "text",
          "required": false,
          "secret": false,
          "placeholder": "my-bucket",
          "description": "Optional default bucket reused by object-level actions. Use a bucket from your own S3 resources as documented here: https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-bucket-overview.html"
        },
        {
          "key": "sessionToken",
          "label": "Session Token",
          "inputType": "password",
          "required": false,
          "secret": true,
          "placeholder": "Optional STS session token",
          "description": "Optional STS session token from the same temporary AWS credential set when you use STS or AssumeRole credentials."
        }
      ]
    }
  ],
  "homepageUrl": "https://aws.amazon.com/s3/",
  "actions": [
    {
      "id": "aws_s3.delete_object",
      "service": "aws_s3",
      "name": "delete_object",
      "description": "Delete one S3 object.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "bucket": {
            "type": "string",
            "minLength": 1,
            "description": "The S3 bucket name."
          },
          "objectKey": {
            "type": "string",
            "minLength": 1,
            "description": "The S3 object key."
          },
          "region": {
            "type": "string",
            "minLength": 1,
            "description": "The AWS region, for example `us-east-1`. Connections can omit it on each call to reuse the connected default region."
          },
          "versionId": {
            "type": "string",
            "description": "The optional object version ID."
          }
        },
        "additionalProperties": false,
        "required": [
          "objectKey"
        ],
        "description": "The input payload for this action."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "bucket": {
            "type": "string",
            "description": "The bucket that contained the deleted object."
          },
          "objectKey": {
            "type": "string",
            "description": "The deleted object key."
          },
          "deleted": {
            "type": "boolean",
            "description": "Whether the delete request completed successfully."
          }
        },
        "additionalProperties": false,
        "description": "The output payload for this action."
      }
    },
    {
      "id": "aws_s3.generate_presigned_url",
      "service": "aws_s3",
      "name": "generate_presigned_url",
      "description": "Generate a pre-signed S3 URL for reading, uploading, or deleting one object.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "bucket": {
            "type": "string",
            "minLength": 1,
            "description": "The S3 bucket name."
          },
          "objectKey": {
            "type": "string",
            "minLength": 1,
            "description": "The S3 object key."
          },
          "region": {
            "type": "string",
            "minLength": 1,
            "description": "The AWS region, for example `us-east-1`. Connections can omit it on each call to reuse the connected default region."
          },
          "method": {
            "type": "string",
            "enum": [
              "GET",
              "PUT",
              "DELETE"
            ],
            "description": "The HTTP method that the signed URL should allow."
          },
          "expiresSeconds": {
            "type": "integer",
            "minimum": 1,
            "maximum": 604800,
            "description": "How long the signed URL remains valid, in seconds."
          },
          "contentType": {
            "type": "string",
            "description": "The Content-Type that must be used with the signed request."
          }
        },
        "additionalProperties": false,
        "required": [
          "objectKey"
        ],
        "description": "The input payload for this action."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "bucket": {
            "type": "string",
            "description": "The bucket used to build the signed URL."
          },
          "objectKey": {
            "type": "string",
            "description": "The object key used to build the signed URL."
          },
          "method": {
            "type": "string",
            "description": "The signed HTTP method."
          },
          "expiresSeconds": {
            "type": "integer",
            "description": "The URL validity duration in seconds."
          },
          "url": {
            "type": "string",
            "description": "The generated pre-signed URL."
          }
        },
        "additionalProperties": false,
        "description": "The output payload for this action."
      }
    },
    {
      "id": "aws_s3.head_object",
      "service": "aws_s3",
      "name": "head_object",
      "description": "Fetch structured metadata for one S3 object.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "bucket": {
            "type": "string",
            "minLength": 1,
            "description": "The S3 bucket name."
          },
          "objectKey": {
            "type": "string",
            "minLength": 1,
            "description": "The S3 object key."
          },
          "region": {
            "type": "string",
            "minLength": 1,
            "description": "The AWS region, for example `us-east-1`. Connections can omit it on each call to reuse the connected default region."
          },
          "versionId": {
            "type": "string",
            "description": "The optional object version ID."
          }
        },
        "additionalProperties": false,
        "required": [
          "objectKey"
        ],
        "description": "The input payload for this action."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "object": {
            "type": "object",
            "properties": {
              "bucket": {
                "type": "string",
                "description": "The bucket that stores the object."
              },
              "objectKey": {
                "type": "string",
                "description": "The object key."
              },
              "etag": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The object ETag, or null when S3 did not return it."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "contentLength": {
                "anyOf": [
                  {
                    "type": "integer",
                    "description": "The object size in bytes, or null when S3 did not return it."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "contentType": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The object Content-Type, or null when S3 did not return it."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "lastModified": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The object last modified timestamp, or null when S3 did not return it."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "cacheControl": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The Cache-Control header, or null when S3 did not return it."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "contentDisposition": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The Content-Disposition header, or null when S3 did not return it."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "contentEncoding": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The Content-Encoding header, or null when S3 did not return it."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "storageClass": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The object storage class, or null when S3 did not return it."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "versionId": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The object version ID, or null when S3 did not return it."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "metadata": {
                "type": "object",
                "additionalProperties": {
                  "type": "string",
                  "description": "One metadata value."
                },
                "description": "The user-defined `x-amz-meta-*` metadata attached to the object."
              },
              "headers": {
                "type": "object",
                "additionalProperties": {
                  "type": "string",
                  "description": "One header value."
                },
                "description": "The raw response headers returned by S3 for this object metadata request."
              }
            },
            "additionalProperties": false,
            "description": "Structured S3 object metadata."
          }
        },
        "additionalProperties": false,
        "description": "The output payload for this action."
      }
    },
    {
      "id": "aws_s3.list_buckets",
      "service": "aws_s3",
      "name": "list_buckets",
      "description": "List Amazon S3 buckets visible to the connected AWS credential.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "region": {
            "type": "string",
            "minLength": 1,
            "description": "The AWS region, for example `us-east-1`. Connections can omit it on each call to reuse the connected default region."
          },
          "prefix": {
            "type": "string",
            "description": "Filter buckets by name prefix."
          },
          "marker": {
            "type": "string",
            "description": "Continue listing buckets from the continuation token returned by S3."
          },
          "maxKeys": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10000,
            "description": "The maximum number of buckets to return."
          }
        },
        "additionalProperties": false,
        "description": "The input payload for this action."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "buckets": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "The bucket name."
                },
                "region": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The bucket region, or null when S3 omitted it."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "creationDate": {
                  "type": "string",
                  "description": "The bucket creation timestamp."
                },
                "storageClass": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The bucket storage class, or null when S3 did not expose one."
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "additionalProperties": false,
              "description": "An S3 bucket summary."
            },
            "description": "The returned bucket summaries."
          },
          "owner": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "The owner identifier."
                  },
                  "displayName": {
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "The owner display name, or null when S3 omitted it."
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "additionalProperties": false,
                "description": "The bucket or object owner."
              },
              {
                "type": "null"
              }
            ]
          },
          "isTruncated": {
            "type": "boolean",
            "description": "Whether more buckets are available."
          },
          "nextMarker": {
            "anyOf": [
              {
                "type": "string",
                "description": "The continuation token for the next page, or null when the list is complete."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "description": "The output payload for this action."
      }
    },
    {
      "id": "aws_s3.list_objects",
      "service": "aws_s3",
      "name": "list_objects",
      "description": "List objects in an S3 bucket with the ListObjectsV2 API.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "bucket": {
            "type": "string",
            "minLength": 1,
            "description": "The S3 bucket name."
          },
          "region": {
            "type": "string",
            "minLength": 1,
            "description": "The AWS region, for example `us-east-1`. Connections can omit it on each call to reuse the connected default region."
          },
          "prefix": {
            "type": "string",
            "description": "Filter objects by key prefix."
          },
          "delimiter": {
            "type": "string",
            "description": "Group keys by this delimiter, for example `/` to emulate folders."
          },
          "continuationToken": {
            "type": "string",
            "description": "Continue listing from the continuation token returned by S3."
          },
          "startAfter": {
            "type": "string",
            "description": "Start listing after this object key."
          },
          "fetchOwner": {
            "type": "boolean",
            "description": "Whether to include owner information for each object."
          },
          "maxKeys": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000,
            "description": "The maximum number of objects to return."
          }
        },
        "additionalProperties": false,
        "required": [
          "bucket"
        ],
        "description": "The input payload for this action."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "objects": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "The object key."
                },
                "url": {
                  "type": "string",
                  "description": "The canonical S3 URL for the object."
                },
                "lastModified": {
                  "type": "string",
                  "description": "The object's last modified timestamp."
                },
                "etag": {
                  "type": "string",
                  "description": "The object's ETag."
                },
                "type": {
                  "type": "string",
                  "description": "The S3 object type."
                },
                "size": {
                  "type": "integer",
                  "description": "The object size in bytes."
                },
                "storageClass": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The object storage class."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "owner": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "The owner identifier."
                        },
                        "displayName": {
                          "anyOf": [
                            {
                              "type": "string",
                              "description": "The owner display name, or null when S3 omitted it."
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "additionalProperties": false,
                      "description": "The bucket or object owner."
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "additionalProperties": false,
              "description": "An S3 object summary."
            },
            "description": "The listed objects."
          },
          "prefixes": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "One common prefix."
            },
            "description": "The common prefixes returned by S3."
          },
          "isTruncated": {
            "type": "boolean",
            "description": "Whether more objects are available."
          },
          "keyCount": {
            "type": "integer",
            "description": "The number of keys returned in this page."
          },
          "continuationToken": {
            "anyOf": [
              {
                "type": "string",
                "description": "The continuation token echoed by S3, or null when absent."
              },
              {
                "type": "null"
              }
            ]
          },
          "nextContinuationToken": {
            "anyOf": [
              {
                "type": "string",
                "description": "The continuation token for the next page, or null when the list is complete."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "description": "The output payload for this action."
      }
    },
    {
      "id": "aws_s3.put_object",
      "service": "aws_s3",
      "name": "put_object",
      "description": "Upload one object to S3 from a public URL, plain text, or base64-encoded content.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "bucket": {
            "type": "string",
            "minLength": 1,
            "description": "The S3 bucket name."
          },
          "objectKey": {
            "type": "string",
            "minLength": 1,
            "description": "The S3 object key."
          },
          "region": {
            "type": "string",
            "minLength": 1,
            "description": "The AWS region, for example `us-east-1`. Connections can omit it on each call to reuse the connected default region."
          },
          "sourceUrl": {
            "type": "string",
            "description": "A public URL that the connector can fetch and upload to S3.",
            "format": "uri"
          },
          "contentText": {
            "type": "string",
            "description": "The plain-text content to upload."
          },
          "contentBase64": {
            "type": "string",
            "description": "Base64-encoded binary content to upload."
          },
          "contentType": {
            "type": "string",
            "description": "The Content-Type header to store on the object."
          },
          "cacheControl": {
            "type": "string",
            "description": "The Cache-Control header to store on the object."
          },
          "contentDisposition": {
            "type": "string",
            "description": "The Content-Disposition header to store on the object."
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "description": "One metadata value."
            },
            "description": "The user-defined metadata to store under `x-amz-meta-*`."
          }
        },
        "additionalProperties": false,
        "required": [
          "objectKey"
        ],
        "description": "The input payload for this action.",
        "oneOf": [
          {
            "required": [
              "sourceUrl"
            ]
          },
          {
            "required": [
              "contentText"
            ]
          },
          {
            "required": [
              "contentBase64"
            ]
          }
        ]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "bucket": {
            "type": "string",
            "description": "The bucket that received the object."
          },
          "objectKey": {
            "type": "string",
            "description": "The uploaded object key."
          },
          "url": {
            "type": "string",
            "description": "The canonical S3 URL for the uploaded object."
          },
          "etag": {
            "anyOf": [
              {
                "type": "string",
                "description": "The uploaded object ETag, or null when S3 omitted it."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "description": "The output payload for this action."
      }
    }
  ]
}
