{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-datasync/json-schema/amazon-datasync-create-location-object-storage-request-schema.json",
  "title": "CreateLocationObjectStorageRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-datasync-location-object-storage-api-openapi.yml#/components/schemas/CreateLocationObjectStorageRequest",
  "type": "object",
  "properties": {
    "ServerHostname": {
      "type": "string",
      "description": "Specifies the domain name or IP address (IPv4 or IPv6) of the object storage server that your DataSync agent connects to."
    },
    "ServerPort": {
      "type": "integer",
      "description": "Specifies the port that your object storage server accepts inbound network traffic on (for example, port 443)."
    },
    "ServerProtocol": {
      "type": "string",
      "enum": [
        "HTTPS",
        "HTTP"
      ],
      "description": "Specifies the protocol that your object storage server uses to communicate. If not specified, the default value is HTTPS."
    },
    "Subdirectory": {
      "type": "string",
      "description": "Specifies the object prefix for your object storage server. If this is a source location, DataSync only copies objects with this prefix. If this is a destination location, DataSync writes all objects with this prefix."
    },
    "BucketName": {
      "type": "string",
      "description": "Specifies the name of the object storage bucket involved in the transfer."
    },
    "AccessKey": {
      "type": "string",
      "description": "Specifies the access key (for example, a user name) if credentials are required to authenticate with the object storage server."
    },
    "SecretKey": {
      "type": "string",
      "description": "Specifies the secret key (for example, a password) if credentials are required to authenticate with the object storage server. If you provide a secret using SecretKey, but do not provide secret configuration details using CmkSecretConfig or CustomSecretConfig, then DataSync stores the token using your Amazon Web Services account's Secrets Manager secret."
    },
    "FederatedIdentity": {
      "$ref": "#/$defs/ObjectStorageFederatedIdentityConfig"
    },
    "AgentArns": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "(Optional) Specifies the Amazon Resource Names (ARNs) of the DataSync agents that can connect with your object storage system. If you are setting up an agentless cross-cloud transfer, you do not need to specify a value for this parameter. Make sure you configure this parameter correctly when you first create your storage location. You cannot add or remove agents from a storage location after you create it."
    },
    "Tags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/TagListEntry"
      },
      "description": "Specifies the key-value pair that represents a tag that you want to add to the resource. Tags can help you manage, filter, and search for your resources. We recommend creating a name tag for your location."
    },
    "ServerCertificate": {
      "type": "string",
      "format": "byte",
      "description": "Specifies a certificate chain for DataSync to authenticate with your object storage system if the system uses a private or self-signed certificate authority (CA). You must specify a single .pem file with a full certificate chain (for example, file:///home/user/.ssh/object_storage_certificates.pem). The certificate chain might include: The object storage system's certificate All intermediate certificates (if there are any) The root certificate of the signing CA You can concatenate your certificates into a .pem file (which can be up to 32768 bytes before base64 encoding). The following example c"
    },
    "CmkSecretConfig": {
      "$ref": "#/$defs/CmkSecretConfig"
    },
    "CustomSecretConfig": {
      "$ref": "#/$defs/CustomSecretConfig"
    }
  },
  "required": [
    "ServerHostname",
    "BucketName"
  ],
  "$defs": {
    "CmkSecretConfig": {
      "type": "object",
      "properties": {
        "SecretArn": {
          "type": "string",
          "description": "Specifies the ARN for the DataSync-managed Secrets Manager secret that that is used to access a specific storage location. This property is generated by DataSync and is read-only. DataSync encrypts this secret with the KMS key that you specify for KmsKeyArn."
        },
        "KmsKeyArn": {
          "type": "string",
          "description": "Specifies the ARN for the customer-managed KMS key that DataSync uses to encrypt the DataSync-managed secret stored for SecretArn. DataSync provides this key to Secrets Manager."
        }
      }
    },
    "CustomSecretConfig": {
      "type": "object",
      "properties": {
        "SecretArn": {
          "type": "string",
          "description": "Specifies the ARN for an Secrets Manager secret."
        },
        "SecretAccessRoleArn": {
          "type": "string",
          "description": "Specifies the ARN for the Identity and Access Management role that DataSync uses to access the secret specified for SecretArn."
        }
      }
    },
    "GoogleOidcConfig": {
      "type": "object",
      "properties": {
        "ProjectName": {
          "type": "string",
          "description": "Human-readable project name (e.g. \"my-project\")."
        },
        "ProjectNumber": {
          "type": "string",
          "description": "Numeric project ID as a string (e.g. \"123456789\")."
        },
        "IdentityPoolName": {
          "type": "string",
          "description": "Human-readable pool name (e.g. \"my-pool\")."
        },
        "IdentityProviderName": {
          "type": "string",
          "description": "Human-readable provider name (e.g. \"my-oidc-provider\")."
        }
      },
      "required": [
        "ProjectName",
        "ProjectNumber",
        "IdentityPoolName",
        "IdentityProviderName"
      ]
    },
    "ObjectStorageExternalIdentityConfig": {
      "type": "object",
      "properties": {
        "GoogleOidc": {
          "$ref": "#/$defs/GoogleOidcConfig"
        }
      }
    },
    "ObjectStorageFederatedIdentityConfig": {
      "type": "object",
      "properties": {
        "AwsIamRole": {
          "type": "string",
          "description": "Specifies the ARN for an Amazon Web Services role that allows DataSync to invoke STS GetWebIdentityToken API on behalf of the customer account and to obtain Amazon Web Services STS JWT (web token)."
        },
        "ExternalIdentity": {
          "$ref": "#/$defs/ObjectStorageExternalIdentityConfig"
        }
      }
    },
    "TagListEntry": {
      "type": "object",
      "properties": {
        "Key": {
          "type": "string",
          "description": "The key for an Amazon Web Services resource tag."
        },
        "Value": {
          "type": "string",
          "description": "The value for an Amazon Web Services resource tag."
        }
      },
      "required": [
        "Key"
      ]
    }
  }
}