/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace FSx { namespace Model { /** *

The configuration for a data repository association (DRA) to be created * during the Amazon File Cache resource creation. The DRA links the cache to * either an Amazon S3 bucket or prefix, or a Network File System (NFS) data * repository that supports the NFSv3 protocol.

The DRA does not support * automatic import or automatic export.

See Also:

AWS * API Reference

*/ class FileCacheDataRepositoryAssociation { public: AWS_FSX_API FileCacheDataRepositoryAssociation(); AWS_FSX_API FileCacheDataRepositoryAssociation(Aws::Utils::Json::JsonView jsonValue); AWS_FSX_API FileCacheDataRepositoryAssociation& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_FSX_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

A path on the cache that points to a high-level directory (such as * /ns1/) or subdirectory (such as /ns1/subdir/) that * will be mapped 1-1 with DataRepositoryPath. The leading forward * slash in the name is required. Two data repository associations cannot have * overlapping cache paths. For example, if a data repository is associated with * cache path /ns1/, then you cannot link another data repository with * cache path /ns1/ns2.

This path specifies where in your cache * files will be exported from. This cache directory can be linked to only one data * repository, and no data repository other can be linked to the directory.

*

The cache path can only be set to root (/) on an NFS DRA when * DataRepositorySubdirectories is specified. If you specify root (/) * as the cache path, you can create only one DRA on the cache.

The cache * path cannot be set to root (/) for an S3 DRA.

*/ inline const Aws::String& GetFileCachePath() const{ return m_fileCachePath; } /** *

A path on the cache that points to a high-level directory (such as * /ns1/) or subdirectory (such as /ns1/subdir/) that * will be mapped 1-1 with DataRepositoryPath. The leading forward * slash in the name is required. Two data repository associations cannot have * overlapping cache paths. For example, if a data repository is associated with * cache path /ns1/, then you cannot link another data repository with * cache path /ns1/ns2.

This path specifies where in your cache * files will be exported from. This cache directory can be linked to only one data * repository, and no data repository other can be linked to the directory.

*

The cache path can only be set to root (/) on an NFS DRA when * DataRepositorySubdirectories is specified. If you specify root (/) * as the cache path, you can create only one DRA on the cache.

The cache * path cannot be set to root (/) for an S3 DRA.

*/ inline bool FileCachePathHasBeenSet() const { return m_fileCachePathHasBeenSet; } /** *

A path on the cache that points to a high-level directory (such as * /ns1/) or subdirectory (such as /ns1/subdir/) that * will be mapped 1-1 with DataRepositoryPath. The leading forward * slash in the name is required. Two data repository associations cannot have * overlapping cache paths. For example, if a data repository is associated with * cache path /ns1/, then you cannot link another data repository with * cache path /ns1/ns2.

This path specifies where in your cache * files will be exported from. This cache directory can be linked to only one data * repository, and no data repository other can be linked to the directory.

*

The cache path can only be set to root (/) on an NFS DRA when * DataRepositorySubdirectories is specified. If you specify root (/) * as the cache path, you can create only one DRA on the cache.

The cache * path cannot be set to root (/) for an S3 DRA.

*/ inline void SetFileCachePath(const Aws::String& value) { m_fileCachePathHasBeenSet = true; m_fileCachePath = value; } /** *

A path on the cache that points to a high-level directory (such as * /ns1/) or subdirectory (such as /ns1/subdir/) that * will be mapped 1-1 with DataRepositoryPath. The leading forward * slash in the name is required. Two data repository associations cannot have * overlapping cache paths. For example, if a data repository is associated with * cache path /ns1/, then you cannot link another data repository with * cache path /ns1/ns2.

This path specifies where in your cache * files will be exported from. This cache directory can be linked to only one data * repository, and no data repository other can be linked to the directory.

*

The cache path can only be set to root (/) on an NFS DRA when * DataRepositorySubdirectories is specified. If you specify root (/) * as the cache path, you can create only one DRA on the cache.

The cache * path cannot be set to root (/) for an S3 DRA.

*/ inline void SetFileCachePath(Aws::String&& value) { m_fileCachePathHasBeenSet = true; m_fileCachePath = std::move(value); } /** *

A path on the cache that points to a high-level directory (such as * /ns1/) or subdirectory (such as /ns1/subdir/) that * will be mapped 1-1 with DataRepositoryPath. The leading forward * slash in the name is required. Two data repository associations cannot have * overlapping cache paths. For example, if a data repository is associated with * cache path /ns1/, then you cannot link another data repository with * cache path /ns1/ns2.

This path specifies where in your cache * files will be exported from. This cache directory can be linked to only one data * repository, and no data repository other can be linked to the directory.

*

The cache path can only be set to root (/) on an NFS DRA when * DataRepositorySubdirectories is specified. If you specify root (/) * as the cache path, you can create only one DRA on the cache.

The cache * path cannot be set to root (/) for an S3 DRA.

*/ inline void SetFileCachePath(const char* value) { m_fileCachePathHasBeenSet = true; m_fileCachePath.assign(value); } /** *

A path on the cache that points to a high-level directory (such as * /ns1/) or subdirectory (such as /ns1/subdir/) that * will be mapped 1-1 with DataRepositoryPath. The leading forward * slash in the name is required. Two data repository associations cannot have * overlapping cache paths. For example, if a data repository is associated with * cache path /ns1/, then you cannot link another data repository with * cache path /ns1/ns2.

This path specifies where in your cache * files will be exported from. This cache directory can be linked to only one data * repository, and no data repository other can be linked to the directory.

*

The cache path can only be set to root (/) on an NFS DRA when * DataRepositorySubdirectories is specified. If you specify root (/) * as the cache path, you can create only one DRA on the cache.

The cache * path cannot be set to root (/) for an S3 DRA.

*/ inline FileCacheDataRepositoryAssociation& WithFileCachePath(const Aws::String& value) { SetFileCachePath(value); return *this;} /** *

A path on the cache that points to a high-level directory (such as * /ns1/) or subdirectory (such as /ns1/subdir/) that * will be mapped 1-1 with DataRepositoryPath. The leading forward * slash in the name is required. Two data repository associations cannot have * overlapping cache paths. For example, if a data repository is associated with * cache path /ns1/, then you cannot link another data repository with * cache path /ns1/ns2.

This path specifies where in your cache * files will be exported from. This cache directory can be linked to only one data * repository, and no data repository other can be linked to the directory.

*

The cache path can only be set to root (/) on an NFS DRA when * DataRepositorySubdirectories is specified. If you specify root (/) * as the cache path, you can create only one DRA on the cache.

The cache * path cannot be set to root (/) for an S3 DRA.

*/ inline FileCacheDataRepositoryAssociation& WithFileCachePath(Aws::String&& value) { SetFileCachePath(std::move(value)); return *this;} /** *

A path on the cache that points to a high-level directory (such as * /ns1/) or subdirectory (such as /ns1/subdir/) that * will be mapped 1-1 with DataRepositoryPath. The leading forward * slash in the name is required. Two data repository associations cannot have * overlapping cache paths. For example, if a data repository is associated with * cache path /ns1/, then you cannot link another data repository with * cache path /ns1/ns2.

This path specifies where in your cache * files will be exported from. This cache directory can be linked to only one data * repository, and no data repository other can be linked to the directory.

*

The cache path can only be set to root (/) on an NFS DRA when * DataRepositorySubdirectories is specified. If you specify root (/) * as the cache path, you can create only one DRA on the cache.

The cache * path cannot be set to root (/) for an S3 DRA.

*/ inline FileCacheDataRepositoryAssociation& WithFileCachePath(const char* value) { SetFileCachePath(value); return *this;} /** *

The path to the S3 or NFS data repository that links to the cache. You must * provide one of the following paths:

  • The path can be an NFS data * repository that links to the cache. The path can be in one of two formats:

    *
    • If you are not using the DataRepositorySubdirectories * parameter, the path is to an NFS Export directory (or one of its subdirectories) * in the format nsf://nfs-domain-name/exportpath. You can therefore * link a single NFS Export to a single data repository association.

    • *

      If you are using the DataRepositorySubdirectories parameter, the * path is the domain name of the NFS file system in the format * nfs://filer-domain-name, which indicates the root of the * subdirectories specified with the DataRepositorySubdirectories * parameter.

  • The path can be an S3 bucket or prefix * in the format s3://myBucket/myPrefix/.

*/ inline const Aws::String& GetDataRepositoryPath() const{ return m_dataRepositoryPath; } /** *

The path to the S3 or NFS data repository that links to the cache. You must * provide one of the following paths:

  • The path can be an NFS data * repository that links to the cache. The path can be in one of two formats:

    *
    • If you are not using the DataRepositorySubdirectories * parameter, the path is to an NFS Export directory (or one of its subdirectories) * in the format nsf://nfs-domain-name/exportpath. You can therefore * link a single NFS Export to a single data repository association.

    • *

      If you are using the DataRepositorySubdirectories parameter, the * path is the domain name of the NFS file system in the format * nfs://filer-domain-name, which indicates the root of the * subdirectories specified with the DataRepositorySubdirectories * parameter.

  • The path can be an S3 bucket or prefix * in the format s3://myBucket/myPrefix/.

*/ inline bool DataRepositoryPathHasBeenSet() const { return m_dataRepositoryPathHasBeenSet; } /** *

The path to the S3 or NFS data repository that links to the cache. You must * provide one of the following paths:

  • The path can be an NFS data * repository that links to the cache. The path can be in one of two formats:

    *
    • If you are not using the DataRepositorySubdirectories * parameter, the path is to an NFS Export directory (or one of its subdirectories) * in the format nsf://nfs-domain-name/exportpath. You can therefore * link a single NFS Export to a single data repository association.

    • *

      If you are using the DataRepositorySubdirectories parameter, the * path is the domain name of the NFS file system in the format * nfs://filer-domain-name, which indicates the root of the * subdirectories specified with the DataRepositorySubdirectories * parameter.

  • The path can be an S3 bucket or prefix * in the format s3://myBucket/myPrefix/.

*/ inline void SetDataRepositoryPath(const Aws::String& value) { m_dataRepositoryPathHasBeenSet = true; m_dataRepositoryPath = value; } /** *

The path to the S3 or NFS data repository that links to the cache. You must * provide one of the following paths:

  • The path can be an NFS data * repository that links to the cache. The path can be in one of two formats:

    *
    • If you are not using the DataRepositorySubdirectories * parameter, the path is to an NFS Export directory (or one of its subdirectories) * in the format nsf://nfs-domain-name/exportpath. You can therefore * link a single NFS Export to a single data repository association.

    • *

      If you are using the DataRepositorySubdirectories parameter, the * path is the domain name of the NFS file system in the format * nfs://filer-domain-name, which indicates the root of the * subdirectories specified with the DataRepositorySubdirectories * parameter.

  • The path can be an S3 bucket or prefix * in the format s3://myBucket/myPrefix/.

*/ inline void SetDataRepositoryPath(Aws::String&& value) { m_dataRepositoryPathHasBeenSet = true; m_dataRepositoryPath = std::move(value); } /** *

The path to the S3 or NFS data repository that links to the cache. You must * provide one of the following paths:

  • The path can be an NFS data * repository that links to the cache. The path can be in one of two formats:

    *
    • If you are not using the DataRepositorySubdirectories * parameter, the path is to an NFS Export directory (or one of its subdirectories) * in the format nsf://nfs-domain-name/exportpath. You can therefore * link a single NFS Export to a single data repository association.

    • *

      If you are using the DataRepositorySubdirectories parameter, the * path is the domain name of the NFS file system in the format * nfs://filer-domain-name, which indicates the root of the * subdirectories specified with the DataRepositorySubdirectories * parameter.

  • The path can be an S3 bucket or prefix * in the format s3://myBucket/myPrefix/.

*/ inline void SetDataRepositoryPath(const char* value) { m_dataRepositoryPathHasBeenSet = true; m_dataRepositoryPath.assign(value); } /** *

The path to the S3 or NFS data repository that links to the cache. You must * provide one of the following paths:

  • The path can be an NFS data * repository that links to the cache. The path can be in one of two formats:

    *
    • If you are not using the DataRepositorySubdirectories * parameter, the path is to an NFS Export directory (or one of its subdirectories) * in the format nsf://nfs-domain-name/exportpath. You can therefore * link a single NFS Export to a single data repository association.

    • *

      If you are using the DataRepositorySubdirectories parameter, the * path is the domain name of the NFS file system in the format * nfs://filer-domain-name, which indicates the root of the * subdirectories specified with the DataRepositorySubdirectories * parameter.

  • The path can be an S3 bucket or prefix * in the format s3://myBucket/myPrefix/.

*/ inline FileCacheDataRepositoryAssociation& WithDataRepositoryPath(const Aws::String& value) { SetDataRepositoryPath(value); return *this;} /** *

The path to the S3 or NFS data repository that links to the cache. You must * provide one of the following paths:

  • The path can be an NFS data * repository that links to the cache. The path can be in one of two formats:

    *
    • If you are not using the DataRepositorySubdirectories * parameter, the path is to an NFS Export directory (or one of its subdirectories) * in the format nsf://nfs-domain-name/exportpath. You can therefore * link a single NFS Export to a single data repository association.

    • *

      If you are using the DataRepositorySubdirectories parameter, the * path is the domain name of the NFS file system in the format * nfs://filer-domain-name, which indicates the root of the * subdirectories specified with the DataRepositorySubdirectories * parameter.

  • The path can be an S3 bucket or prefix * in the format s3://myBucket/myPrefix/.

*/ inline FileCacheDataRepositoryAssociation& WithDataRepositoryPath(Aws::String&& value) { SetDataRepositoryPath(std::move(value)); return *this;} /** *

The path to the S3 or NFS data repository that links to the cache. You must * provide one of the following paths:

  • The path can be an NFS data * repository that links to the cache. The path can be in one of two formats:

    *
    • If you are not using the DataRepositorySubdirectories * parameter, the path is to an NFS Export directory (or one of its subdirectories) * in the format nsf://nfs-domain-name/exportpath. You can therefore * link a single NFS Export to a single data repository association.

    • *

      If you are using the DataRepositorySubdirectories parameter, the * path is the domain name of the NFS file system in the format * nfs://filer-domain-name, which indicates the root of the * subdirectories specified with the DataRepositorySubdirectories * parameter.

  • The path can be an S3 bucket or prefix * in the format s3://myBucket/myPrefix/.

*/ inline FileCacheDataRepositoryAssociation& WithDataRepositoryPath(const char* value) { SetDataRepositoryPath(value); return *this;} /** *

A list of NFS Exports that will be linked with this data repository * association. The Export paths are in the format /exportpath1. To * use this parameter, you must configure DataRepositoryPath as the * domain name of the NFS file system. The NFS file system domain name in effect is * the root of the subdirectories. Note that * DataRepositorySubdirectories is not supported for S3 data * repositories.

*/ inline const Aws::Vector& GetDataRepositorySubdirectories() const{ return m_dataRepositorySubdirectories; } /** *

A list of NFS Exports that will be linked with this data repository * association. The Export paths are in the format /exportpath1. To * use this parameter, you must configure DataRepositoryPath as the * domain name of the NFS file system. The NFS file system domain name in effect is * the root of the subdirectories. Note that * DataRepositorySubdirectories is not supported for S3 data * repositories.

*/ inline bool DataRepositorySubdirectoriesHasBeenSet() const { return m_dataRepositorySubdirectoriesHasBeenSet; } /** *

A list of NFS Exports that will be linked with this data repository * association. The Export paths are in the format /exportpath1. To * use this parameter, you must configure DataRepositoryPath as the * domain name of the NFS file system. The NFS file system domain name in effect is * the root of the subdirectories. Note that * DataRepositorySubdirectories is not supported for S3 data * repositories.

*/ inline void SetDataRepositorySubdirectories(const Aws::Vector& value) { m_dataRepositorySubdirectoriesHasBeenSet = true; m_dataRepositorySubdirectories = value; } /** *

A list of NFS Exports that will be linked with this data repository * association. The Export paths are in the format /exportpath1. To * use this parameter, you must configure DataRepositoryPath as the * domain name of the NFS file system. The NFS file system domain name in effect is * the root of the subdirectories. Note that * DataRepositorySubdirectories is not supported for S3 data * repositories.

*/ inline void SetDataRepositorySubdirectories(Aws::Vector&& value) { m_dataRepositorySubdirectoriesHasBeenSet = true; m_dataRepositorySubdirectories = std::move(value); } /** *

A list of NFS Exports that will be linked with this data repository * association. The Export paths are in the format /exportpath1. To * use this parameter, you must configure DataRepositoryPath as the * domain name of the NFS file system. The NFS file system domain name in effect is * the root of the subdirectories. Note that * DataRepositorySubdirectories is not supported for S3 data * repositories.

*/ inline FileCacheDataRepositoryAssociation& WithDataRepositorySubdirectories(const Aws::Vector& value) { SetDataRepositorySubdirectories(value); return *this;} /** *

A list of NFS Exports that will be linked with this data repository * association. The Export paths are in the format /exportpath1. To * use this parameter, you must configure DataRepositoryPath as the * domain name of the NFS file system. The NFS file system domain name in effect is * the root of the subdirectories. Note that * DataRepositorySubdirectories is not supported for S3 data * repositories.

*/ inline FileCacheDataRepositoryAssociation& WithDataRepositorySubdirectories(Aws::Vector&& value) { SetDataRepositorySubdirectories(std::move(value)); return *this;} /** *

A list of NFS Exports that will be linked with this data repository * association. The Export paths are in the format /exportpath1. To * use this parameter, you must configure DataRepositoryPath as the * domain name of the NFS file system. The NFS file system domain name in effect is * the root of the subdirectories. Note that * DataRepositorySubdirectories is not supported for S3 data * repositories.

*/ inline FileCacheDataRepositoryAssociation& AddDataRepositorySubdirectories(const Aws::String& value) { m_dataRepositorySubdirectoriesHasBeenSet = true; m_dataRepositorySubdirectories.push_back(value); return *this; } /** *

A list of NFS Exports that will be linked with this data repository * association. The Export paths are in the format /exportpath1. To * use this parameter, you must configure DataRepositoryPath as the * domain name of the NFS file system. The NFS file system domain name in effect is * the root of the subdirectories. Note that * DataRepositorySubdirectories is not supported for S3 data * repositories.

*/ inline FileCacheDataRepositoryAssociation& AddDataRepositorySubdirectories(Aws::String&& value) { m_dataRepositorySubdirectoriesHasBeenSet = true; m_dataRepositorySubdirectories.push_back(std::move(value)); return *this; } /** *

A list of NFS Exports that will be linked with this data repository * association. The Export paths are in the format /exportpath1. To * use this parameter, you must configure DataRepositoryPath as the * domain name of the NFS file system. The NFS file system domain name in effect is * the root of the subdirectories. Note that * DataRepositorySubdirectories is not supported for S3 data * repositories.

*/ inline FileCacheDataRepositoryAssociation& AddDataRepositorySubdirectories(const char* value) { m_dataRepositorySubdirectoriesHasBeenSet = true; m_dataRepositorySubdirectories.push_back(value); return *this; } /** *

The configuration for a data repository association that links an Amazon File * Cache resource to an NFS data repository.

*/ inline const FileCacheNFSConfiguration& GetNFS() const{ return m_nFS; } /** *

The configuration for a data repository association that links an Amazon File * Cache resource to an NFS data repository.

*/ inline bool NFSHasBeenSet() const { return m_nFSHasBeenSet; } /** *

The configuration for a data repository association that links an Amazon File * Cache resource to an NFS data repository.

*/ inline void SetNFS(const FileCacheNFSConfiguration& value) { m_nFSHasBeenSet = true; m_nFS = value; } /** *

The configuration for a data repository association that links an Amazon File * Cache resource to an NFS data repository.

*/ inline void SetNFS(FileCacheNFSConfiguration&& value) { m_nFSHasBeenSet = true; m_nFS = std::move(value); } /** *

The configuration for a data repository association that links an Amazon File * Cache resource to an NFS data repository.

*/ inline FileCacheDataRepositoryAssociation& WithNFS(const FileCacheNFSConfiguration& value) { SetNFS(value); return *this;} /** *

The configuration for a data repository association that links an Amazon File * Cache resource to an NFS data repository.

*/ inline FileCacheDataRepositoryAssociation& WithNFS(FileCacheNFSConfiguration&& value) { SetNFS(std::move(value)); return *this;} private: Aws::String m_fileCachePath; bool m_fileCachePathHasBeenSet = false; Aws::String m_dataRepositoryPath; bool m_dataRepositoryPathHasBeenSet = false; Aws::Vector m_dataRepositorySubdirectories; bool m_dataRepositorySubdirectoriesHasBeenSet = false; FileCacheNFSConfiguration m_nFS; bool m_nFSHasBeenSet = false; }; } // namespace Model } // namespace FSx } // namespace Aws