AWS SDK for C++  1.8.25
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 ARNResourceType
24  {
25  static const char ACCESSPOINT[] = "accesspoint";
26  }
27 
29 
31  {
32  public:
33  S3ARN(const Aws::String& arn);
34 
35  const Aws::String& GetResourceType() const { return m_resourceType; }
36  const Aws::String& GetResourceId() const { return m_resourceId; }
37  const Aws::String& GetResourceQualifier() const { return m_resourceQualifier; }
38 
39  // Check if S3ARN is valid.
40  S3ARNOutcome Validate() const;
41  // Check if S3ARN is valid, and especially, ARN region should match the region specified.
42  S3ARNOutcome Validate(const char* region) const;
43 
44  private:
45  void ParseARNResource();
46 
47  Aws::String m_resourceType;
48  Aws::String m_resourceId;
49  Aws::String m_resourceQualifier;
50  };
51  }
52 }
const Aws::String & GetResourceId() const
Definition: S3ARN.h:36
Aws::Utils::Outcome< bool, Aws::Client::AWSError< S3Errors > > S3ARNOutcome
Definition: S3ARN.h:28
#define AWS_S3_API
Definition: S3_EXPORTS.h:28
const Aws::String & GetResourceQualifier() const
Definition: S3ARN.h:37
const Aws::String & GetResourceType() const
Definition: S3ARN.h:35
static const char ACCESSPOINT[]
Definition: S3ARN.h:25
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97