AWS SDK for C++  1.9.160
AWS SDK for C++
S3CrtARN.h
Go to the documentation of this file.
1 
6 #pragma once
7 
9 
11 #include <aws/core/utils/ARN.h>
12 #include <aws/s3-crt/S3CrtErrors.h>
13 
14 namespace Aws
15 {
16  namespace Utils
17  {
18  template<typename R, typename E> class Outcome;
19  }
20 
21  namespace S3Crt
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  S3CrtARN(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  S3CrtARNOutcome 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::S3Crt::S3CrtARN::GetResourceType
const Aws::String & GetResourceType() const
Definition: S3CrtARN.h:43
Aws::S3Crt::S3CrtARN::S3CrtARN
S3CrtARN(const Aws::String &arn)
Aws::S3Crt::S3CrtARN::GetResourceId
const Aws::String & GetResourceId() const
Definition: S3CrtARN.h:44
Aws::S3Crt::S3CrtARN::Validate
S3CrtARNOutcome Validate(const char *region) const
AWSError.h
Aws::S3Crt::S3CrtARN::GetSubResourceId
const Aws::String & GetSubResourceId() const
Definition: S3CrtARN.h:46
Aws::S3Crt::ARNResourceType::ACCESSPOINT
static const char ACCESSPOINT[]
Definition: S3CrtARN.h:32
Aws::S3Crt::S3CrtARN::GetSubResourceType
const Aws::String & GetSubResourceType() const
Definition: S3CrtARN.h:45
S3CrtErrors.h
ARN.h
Aws::S3Crt::S3CrtARNOutcome
Aws::Utils::Outcome< bool, Aws::Client::AWSError< S3CrtErrors > > S3CrtARNOutcome
Definition: S3CrtARN.h:36
Aws::S3Crt::ARNService::S3
static const char S3[]
Definition: S3CrtARN.h:25
AWS_S3CRT_API
#define AWS_S3CRT_API
Definition: S3Crt_EXPORTS.h:28
Aws::S3Crt::S3CrtARN::Validate
S3CrtARNOutcome Validate() const
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::S3Crt::ARNService::S3_OBJECT_LAMBDA
static const char S3_OBJECT_LAMBDA[]
Definition: S3CrtARN.h:27
Aws::S3Crt::ARNResourceType::OUTPOST
static const char OUTPOST[]
Definition: S3CrtARN.h:33
Aws::Utils::ARN
Definition: ARN.h:24
S3Crt_EXPORTS.h
Aws::S3Crt::S3CrtARN::GetResourceQualifier
const Aws::String & GetResourceQualifier() const
Definition: S3CrtARN.h:47
Aws::S3Crt::S3CrtARN
Definition: S3CrtARN.h:39
Aws::S3Crt::ARNService::S3_OUTPOSTS
static const char S3_OUTPOSTS[]
Definition: S3CrtARN.h:26