From abaf88548bdd33a142769a9d477799769606b8ab Mon Sep 17 00:00:00 2001
From: dinghh
The Amazon Resource Name (ARN) of the managed policy that you want @@ -50,7 +50,7 @@ namespace Model * href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon * Resource Names (ARNs) in the AWS General Reference.
*/ - inline bool PolicyArnHasBeenSet() const { return m_policyArnHasBeenSet; } + inline bool PolicyNameHasBeenSet() const { return m_policyNameHasBeenSet; } /** *The Amazon Resource Name (ARN) of the managed policy that you want @@ -58,7 +58,7 @@ namespace Model * href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon * Resource Names (ARNs) in the AWS General Reference.
*/ - inline void SetPolicyArn(const Aws::String& value) { m_policyArnHasBeenSet = true; m_policyArn = value; } + inline void SetPolicyName(const Aws::String& value) { m_policyNameHasBeenSet = true; m_policyName = value; } /** *The Amazon Resource Name (ARN) of the managed policy that you want @@ -66,7 +66,7 @@ namespace Model * href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon * Resource Names (ARNs) in the AWS General Reference.
*/ - inline void SetPolicyArn(Aws::String&& value) { m_policyArnHasBeenSet = true; m_policyArn = std::move(value); } + inline void SetPolicyName(Aws::String&& value) { m_policyNameHasBeenSet = true; m_policyName = std::move(value); } /** *The Amazon Resource Name (ARN) of the managed policy that you want @@ -74,7 +74,7 @@ namespace Model * href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon * Resource Names (ARNs) in the AWS General Reference.
*/ - inline void SetPolicyArn(const char* value) { m_policyArnHasBeenSet = true; m_policyArn.assign(value); } + inline void SetPolicyName(const char* value) { m_policyNameHasBeenSet = true; m_policyName.assign(value); } /** *The Amazon Resource Name (ARN) of the managed policy that you want @@ -82,7 +82,7 @@ namespace Model * href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon * Resource Names (ARNs) in the AWS General Reference.
*/ - inline GetPolicyRequest& WithPolicyArn(const Aws::String& value) { SetPolicyArn(value); return *this;} + inline GetPolicyRequest& WithPolicyName(const Aws::String& value) { SetPolicyName(value); return *this;} /** *The Amazon Resource Name (ARN) of the managed policy that you want @@ -90,7 +90,7 @@ namespace Model * href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon * Resource Names (ARNs) in the AWS General Reference.
*/ - inline GetPolicyRequest& WithPolicyArn(Aws::String&& value) { SetPolicyArn(std::move(value)); return *this;} + inline GetPolicyRequest& WithPolicyName(Aws::String&& value) { SetPolicyName(std::move(value)); return *this;} /** *The Amazon Resource Name (ARN) of the managed policy that you want @@ -98,12 +98,12 @@ namespace Model * href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon * Resource Names (ARNs) in the AWS General Reference.
*/ - inline GetPolicyRequest& WithPolicyArn(const char* value) { SetPolicyArn(value); return *this;} + inline GetPolicyRequest& WithPolicyName(const char* value) { SetPolicyName(value); return *this;} private: - Aws::String m_policyArn; - bool m_policyArnHasBeenSet; + Aws::String m_policyName; + bool m_policyNameHasBeenSet; }; } // namespace Model diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/Policy.h b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/Policy.h index 3a21539f0..d32e659e0 100644 --- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/Policy.h +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/Policy.h @@ -88,6 +88,45 @@ namespace Model */ inline Policy& WithPolicyName(const char* value) { SetPolicyName(value); return *this;} + /** + *The friendly name (not ARN) identifying the policy.
+ */ + inline const Aws::String& GetDocument() const{ return m_document; } + + /** + *The friendly name (not ARN) identifying the policy.
+ */ + inline bool DocumentHasBeenSet() const { return m_documentHasBeenSet; } + + /** + *The friendly name (not ARN) identifying the policy.
+ */ + inline void SetDocument(const Aws::String& value) { m_documentHasBeenSet = true; m_document = value; } + + /** + *The friendly name (not ARN) identifying the policy.
+ */ + inline void SetDocument(Aws::String&& value) { m_documentHasBeenSet = true; m_document = std::move(value); } + + /** + *The friendly name (not ARN) identifying the policy.
+ */ + inline void SetDocument(const char* value) { m_documentHasBeenSet = true; m_document.assign(value); } + + /** + *The friendly name (not ARN) identifying the policy.
+ */ + inline Policy& WithDocument(const Aws::String& value) { SetDocument(value); return *this;} + + /** + *The friendly name (not ARN) identifying the policy.
+ */ + inline Policy& WithDocument(Aws::String&& value) { SetDocument(std::move(value)); return *this;} + + /** + *The friendly name (not ARN) identifying the policy.
+ */ + inline Policy& WithDocument(const char* value) { SetDocument(value); return *this;} /** *The stable and unique string identifying the policy.
For more
@@ -589,6 +628,9 @@ namespace Model
Aws::String m_policyName;
bool m_policyNameHasBeenSet;
+
+ Aws::String m_document;
+ bool m_documentHasBeenSet;
Aws::String m_policyId;
bool m_policyIdHasBeenSet;
diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/GetPolicyRequest.cpp b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/GetPolicyRequest.cpp
index 55d8173c3..1fa78dccc 100644
--- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/GetPolicyRequest.cpp
+++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/GetPolicyRequest.cpp
@@ -11,7 +11,7 @@ using namespace Aws::IAM::Model;
using namespace Aws::Utils;
GetPolicyRequest::GetPolicyRequest() :
- m_policyArnHasBeenSet(false)
+ m_policyNameHasBeenSet(false)
{
}
@@ -19,9 +19,9 @@ Aws::String GetPolicyRequest::SerializePayload() const
{
Aws::StringStream ss;
ss << "Action=GetPolicy&";
- if(m_policyArnHasBeenSet)
+ if(m_policyNameHasBeenSet)
{
- ss << "PolicyArn=" << StringUtils::URLEncode(m_policyArn.c_str()) << "&";
+ ss << "PolicyName=" << StringUtils::URLEncode(m_policyName.c_str()) << "&";
}
ss << "Version=2010-05-08";
diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/Policy.cpp b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/Policy.cpp
index c9135a56e..a9417bb07 100644
--- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/Policy.cpp
+++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/Policy.cpp
@@ -22,6 +22,7 @@ namespace Model
Policy::Policy() :
m_policyNameHasBeenSet(false),
+ m_documentHasBeenSet(false),
m_policyIdHasBeenSet(false),
m_arnHasBeenSet(false),
m_pathHasBeenSet(false),
@@ -41,6 +42,7 @@ Policy::Policy() :
Policy::Policy(const XmlNode& xmlNode) :
m_policyNameHasBeenSet(false),
+ m_documentHasBeenSet(false),
m_policyIdHasBeenSet(false),
m_arnHasBeenSet(false),
m_pathHasBeenSet(false),
@@ -71,6 +73,12 @@ Policy& Policy::operator =(const XmlNode& xmlNode)
m_policyName = Aws::Utils::Xml::DecodeEscapedXmlText(policyNameNode.GetText());
m_policyNameHasBeenSet = true;
}
+ XmlNode documentNode = resultNode.FirstChild("Document");
+ if(!documentNode.IsNull())
+ {
+ m_document = Aws::Utils::Xml::DecodeEscapedXmlText(documentNode.GetText());
+ m_documentHasBeenSet = true;
+ }
XmlNode policyIdNode = resultNode.FirstChild("PolicyId");
if(!policyIdNode.IsNull())
{
@@ -155,6 +163,11 @@ void Policy::OutputToStream(Aws::OStream& oStream, const char* location, unsigne
oStream << location << index << locationValue << ".PolicyName=" << StringUtils::URLEncode(m_policyName.c_str()) << "&";
}
+ if(m_documentHasBeenSet)
+ {
+ oStream << location << index << locationValue << ".Document=" << StringUtils::URLEncode(m_document.c_str()) << "&";
+ }
+
if(m_policyIdHasBeenSet)
{
oStream << location << index << locationValue << ".PolicyId=" << StringUtils::URLEncode(m_policyId.c_str()) << "&";
@@ -224,6 +237,10 @@ void Policy::OutputToStream(Aws::OStream& oStream, const char* location) const
{
oStream << location << ".PolicyName=" << StringUtils::URLEncode(m_policyName.c_str()) << "&";
}
+ if(m_documentHasBeenSet)
+ {
+ oStream << location << ".Document=" << StringUtils::URLEncode(m_document.c_str()) << "&";
+ }
if(m_policyIdHasBeenSet)
{
oStream << location << ".PolicyId=" << StringUtils::URLEncode(m_policyId.c_str()) << "&";
diff --git a/create_policy.cpp b/create_policy.cpp
new file mode 100644
index 000000000..6959bce9e
--- /dev/null
+++ b/create_policy.cpp
@@ -0,0 +1,49 @@
+#include
The Amazon Resource Name (ARN) of the IAM policy you want to delete.
@@ -50,7 +50,7 @@ namespace Model * href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon * Resource Names (ARNs) in the AWS General Reference. */ - inline bool PolicyArnHasBeenSet() const { return m_policyArnHasBeenSet; } + inline bool PolicyNameHasBeenSet() const { return m_policyNameHasBeenSet; } /** *The Amazon Resource Name (ARN) of the IAM policy you want to delete.
@@ -58,7 +58,7 @@ namespace Model * href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon * Resource Names (ARNs) in the AWS General Reference. */ - inline void SetPolicyArn(const Aws::String& value) { m_policyArnHasBeenSet = true; m_policyArn = value; } + inline void SetPolicyName(const Aws::String& value) { m_policyNameHasBeenSet = true; m_policyName = value; } /** *The Amazon Resource Name (ARN) of the IAM policy you want to delete.
@@ -66,7 +66,7 @@ namespace Model * href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon * Resource Names (ARNs) in the AWS General Reference. */ - inline void SetPolicyArn(Aws::String&& value) { m_policyArnHasBeenSet = true; m_policyArn = std::move(value); } + inline void SetPolicyName(Aws::String&& value) { m_policyNameHasBeenSet = true; m_policyName = std::move(value); } /** *The Amazon Resource Name (ARN) of the IAM policy you want to delete.
@@ -74,7 +74,7 @@ namespace Model * href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon * Resource Names (ARNs) in the AWS General Reference. */ - inline void SetPolicyArn(const char* value) { m_policyArnHasBeenSet = true; m_policyArn.assign(value); } + inline void SetPolicyName(const char* value) { m_policyNameHasBeenSet = true; m_policyName.assign(value); } /** *The Amazon Resource Name (ARN) of the IAM policy you want to delete.
@@ -82,7 +82,7 @@ namespace Model * href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon * Resource Names (ARNs) in the AWS General Reference. */ - inline DeletePolicyRequest& WithPolicyArn(const Aws::String& value) { SetPolicyArn(value); return *this;} + inline DeletePolicyRequest& WithPolicyName(const Aws::String& value) { SetPolicyName(value); return *this;} /** *The Amazon Resource Name (ARN) of the IAM policy you want to delete.
@@ -90,7 +90,7 @@ namespace Model * href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon * Resource Names (ARNs) in the AWS General Reference. */ - inline DeletePolicyRequest& WithPolicyArn(Aws::String&& value) { SetPolicyArn(std::move(value)); return *this;} + inline DeletePolicyRequest& WithPolicyName(Aws::String&& value) { SetPolicyName(std::move(value)); return *this;} /** *The Amazon Resource Name (ARN) of the IAM policy you want to delete.
@@ -98,12 +98,12 @@ namespace Model * href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon * Resource Names (ARNs) in the AWS General Reference. */ - inline DeletePolicyRequest& WithPolicyArn(const char* value) { SetPolicyArn(value); return *this;} + inline DeletePolicyRequest& WithPolicyName(const char* value) { SetPolicyName(value); return *this;} private: - Aws::String m_policyArn; - bool m_policyArnHasBeenSet; + Aws::String m_policyName; + bool m_policyNameHasBeenSet; }; } // namespace Model diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/DeletePolicyRequest.cpp b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/DeletePolicyRequest.cpp index 6bccc6127..5e3847cca 100644 --- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/DeletePolicyRequest.cpp +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/DeletePolicyRequest.cpp @@ -11,7 +11,7 @@ using namespace Aws::IAM::Model; using namespace Aws::Utils; DeletePolicyRequest::DeletePolicyRequest() : - m_policyArnHasBeenSet(false) + m_policyNameHasBeenSet(false) { } @@ -19,9 +19,9 @@ Aws::String DeletePolicyRequest::SerializePayload() const { Aws::StringStream ss; ss << "Action=DeletePolicy&"; - if(m_policyArnHasBeenSet) + if(m_policyNameHasBeenSet) { - ss << "PolicyArn=" << StringUtils::URLEncode(m_policyArn.c_str()) << "&"; + ss << "PolicyName=" << StringUtils::URLEncode(m_policyName.c_str()) << "&"; } ss << "Version=2010-05-08"; diff --git a/delete_policy.cpp b/delete_policy.cpp new file mode 100644 index 000000000..623441c81 --- /dev/null +++ b/delete_policy.cpp @@ -0,0 +1,45 @@ +#include