AWS SDK for C++  1.9.126
AWS SDK for C++
S3ARN.h
Go to the documentation of this file.
1 
6 #pragma once
7 
8 #include <aws/s3/S3_EXPORTS.h>
9 
11 #include <aws/core/utils/ARN.h>
12 #include <aws/s3/S3Errors.h>
13 
14 namespace Aws
15 {
16  namespace Utils
17  {
18  template<typename R, typename E> class Outcome;
19  }
20 
21  namespace S3
22  {
23  namespace ARNService
24  {
25  static const char S3[] = "s3";
26  static const char S3_OUTPOSTS[] = "s3-outposts";
27  static const char S3_OBJECT_LAMBDA[] = "s3-object-lambda";
28  }
29 
30  namespace ARNResourceType
31  {
32  static const char ACCESSPOINT[] = "accesspoint";
33  static const char OUTPOST[] = "outpost";
34  }
35 
37 
39  {
40  public:
41  S3ARN(const Aws::String& arn);
42 
43  const Aws::String& GetResourceType() const { return m_resourceType; }
44  const Aws::String& GetResourceId() const { return m_resourceId; }
45  const Aws::String& GetSubResourceType() const { return m_subResourceType; }
46  const Aws::String& GetSubResourceId() const { return m_subResourceId; }
47  const Aws::String& GetResourceQualifier() const { return m_resourceQualifier; }
48 
49  // Check if S3ARN is valid.
51  // Check if S3ARN is valid, and especially, ARN region should match the region specified.
52  S3ARNOutcome Validate(const char* region) const;
53 
54  private:
55  void ParseARNResource();
56 
57  Aws::String m_resourceType;
58  Aws::String m_resourceId;
59  Aws::String m_subResourceType;
60  Aws::String m_subResourceId;
61  Aws::String m_resourceQualifier;
62  };
63  }
64 }
Aws::S3::S3ARN::GetSubResourceType
const Aws::String & GetSubResourceType() const
Definition: S3ARN.h:45
Aws::S3::S3ARN::GetResourceId
const Aws::String & GetResourceId() const
Definition: S3ARN.h:44
Aws::S3::S3ARN::Validate
S3ARNOutcome Validate(const char *region) const
AWSError.h
Aws::S3::S3ARNOutcome
Aws::Utils::Outcome< bool, Aws::Client::AWSError< S3Errors > > S3ARNOutcome
Definition: S3ARN.h:36
Aws::S3::S3ARN
Definition: S3ARN.h:39
Aws::S3::ARNService::S3_OBJECT_LAMBDA
static const char S3_OBJECT_LAMBDA[]
Definition: S3ARN.h:27
Aws::S3::S3ARN::GetSubResourceId
const Aws::String & GetSubResourceId() const
Definition: S3ARN.h:46
S3_EXPORTS.h
AWS_S3_API
#define AWS_S3_API
Definition: S3_EXPORTS.h:28
S3Errors.h
ARN.h
Aws::S3::S3ARN::GetResourceType
const Aws::String & GetResourceType() const
Definition: S3ARN.h:43
Aws::S3::ARNResourceType::OUTPOST
static const char OUTPOST[]
Definition: S3ARN.h:33
Aws::S3::S3ARN::Validate
S3ARNOutcome Validate() const
Aws::S3::ARNService::S3_OUTPOSTS
static const char S3_OUTPOSTS[]
Definition: S3ARN.h:26
Aws::S3::S3ARN::S3ARN
S3ARN(const Aws::String &arn)
Aws
Definition: AccessManagementClient.h:15
Aws::Utils::Outcome
Definition: Outcome.h:26
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::Utils::ARN
Definition: ARN.h:24
Aws::S3::ARNResourceType::ACCESSPOINT
static const char ACCESSPOINT[]
Definition: S3ARN.h:32
Aws::S3::S3ARN::GetResourceQualifier
const Aws::String & GetResourceQualifier() const
Definition: S3ARN.h:47
Aws::S3::ARNService::S3
static const char S3[]
Definition: S3ARN.h:25