1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 #pragma once
7 #include <aws/iam/IAM_EXPORTS.h>
8 #include <aws/iam/IAMRequest.h>
9 #include <aws/core/utils/memory/stl/AWSString.h>
10 #include <utility>
11 
12 namespace Aws
13 {
14 namespace IAM
15 {
16 namespace Model
17 {
18 
19   /**
20    */
21   class AWS_IAM_API CreateServiceSpecificCredentialRequest : public IAMRequest
22   {
23   public:
24     CreateServiceSpecificCredentialRequest();
25 
26     // Service request name is the Operation name which will send this request out,
27     // each operation should has unique request name, so that we can get operation's name from this request.
28     // Note: this is not true for response, multiple operations may have the same response name,
29     // so we can not get operation's name from response.
GetServiceRequestName()30     inline virtual const char* GetServiceRequestName() const override { return "CreateServiceSpecificCredential"; }
31 
32     Aws::String SerializePayload() const override;
33 
34   protected:
35     void DumpBodyToUrl(Aws::Http::URI& uri ) const override;
36 
37   public:
38 
39     /**
40      * <p>The name of the IAM user that is to be associated with the credentials. The
41      * new service-specific credentials have the same permissions as the associated
42      * user except that they can be used only to access the specified service.</p>
43      * <p>This parameter allows (through its <a
44      * href="http://wikipedia.org/wiki/regex">regex pattern</a>) a string of characters
45      * consisting of upper and lowercase alphanumeric characters with no spaces. You
46      * can also include any of the following characters: _+=,.@-</p>
47      */
GetUserName()48     inline const Aws::String& GetUserName() const{ return m_userName; }
49 
50     /**
51      * <p>The name of the IAM user that is to be associated with the credentials. The
52      * new service-specific credentials have the same permissions as the associated
53      * user except that they can be used only to access the specified service.</p>
54      * <p>This parameter allows (through its <a
55      * href="http://wikipedia.org/wiki/regex">regex pattern</a>) a string of characters
56      * consisting of upper and lowercase alphanumeric characters with no spaces. You
57      * can also include any of the following characters: _+=,.@-</p>
58      */
UserNameHasBeenSet()59     inline bool UserNameHasBeenSet() const { return m_userNameHasBeenSet; }
60 
61     /**
62      * <p>The name of the IAM user that is to be associated with the credentials. The
63      * new service-specific credentials have the same permissions as the associated
64      * user except that they can be used only to access the specified service.</p>
65      * <p>This parameter allows (through its <a
66      * href="http://wikipedia.org/wiki/regex">regex pattern</a>) a string of characters
67      * consisting of upper and lowercase alphanumeric characters with no spaces. You
68      * can also include any of the following characters: _+=,.@-</p>
69      */
SetUserName(const Aws::String & value)70     inline void SetUserName(const Aws::String& value) { m_userNameHasBeenSet = true; m_userName = value; }
71 
72     /**
73      * <p>The name of the IAM user that is to be associated with the credentials. The
74      * new service-specific credentials have the same permissions as the associated
75      * user except that they can be used only to access the specified service.</p>
76      * <p>This parameter allows (through its <a
77      * href="http://wikipedia.org/wiki/regex">regex pattern</a>) a string of characters
78      * consisting of upper and lowercase alphanumeric characters with no spaces. You
79      * can also include any of the following characters: _+=,.@-</p>
80      */
SetUserName(Aws::String && value)81     inline void SetUserName(Aws::String&& value) { m_userNameHasBeenSet = true; m_userName = std::move(value); }
82 
83     /**
84      * <p>The name of the IAM user that is to be associated with the credentials. The
85      * new service-specific credentials have the same permissions as the associated
86      * user except that they can be used only to access the specified service.</p>
87      * <p>This parameter allows (through its <a
88      * href="http://wikipedia.org/wiki/regex">regex pattern</a>) a string of characters
89      * consisting of upper and lowercase alphanumeric characters with no spaces. You
90      * can also include any of the following characters: _+=,.@-</p>
91      */
SetUserName(const char * value)92     inline void SetUserName(const char* value) { m_userNameHasBeenSet = true; m_userName.assign(value); }
93 
94     /**
95      * <p>The name of the IAM user that is to be associated with the credentials. The
96      * new service-specific credentials have the same permissions as the associated
97      * user except that they can be used only to access the specified service.</p>
98      * <p>This parameter allows (through its <a
99      * href="http://wikipedia.org/wiki/regex">regex pattern</a>) a string of characters
100      * consisting of upper and lowercase alphanumeric characters with no spaces. You
101      * can also include any of the following characters: _+=,.@-</p>
102      */
WithUserName(const Aws::String & value)103     inline CreateServiceSpecificCredentialRequest& WithUserName(const Aws::String& value) { SetUserName(value); return *this;}
104 
105     /**
106      * <p>The name of the IAM user that is to be associated with the credentials. The
107      * new service-specific credentials have the same permissions as the associated
108      * user except that they can be used only to access the specified service.</p>
109      * <p>This parameter allows (through its <a
110      * href="http://wikipedia.org/wiki/regex">regex pattern</a>) a string of characters
111      * consisting of upper and lowercase alphanumeric characters with no spaces. You
112      * can also include any of the following characters: _+=,.@-</p>
113      */
WithUserName(Aws::String && value)114     inline CreateServiceSpecificCredentialRequest& WithUserName(Aws::String&& value) { SetUserName(std::move(value)); return *this;}
115 
116     /**
117      * <p>The name of the IAM user that is to be associated with the credentials. The
118      * new service-specific credentials have the same permissions as the associated
119      * user except that they can be used only to access the specified service.</p>
120      * <p>This parameter allows (through its <a
121      * href="http://wikipedia.org/wiki/regex">regex pattern</a>) a string of characters
122      * consisting of upper and lowercase alphanumeric characters with no spaces. You
123      * can also include any of the following characters: _+=,.@-</p>
124      */
WithUserName(const char * value)125     inline CreateServiceSpecificCredentialRequest& WithUserName(const char* value) { SetUserName(value); return *this;}
126 
127 
128     /**
129      * <p>The name of the Amazon Web Services service that is to be associated with the
130      * credentials. The service you specify here is the only service that can be
131      * accessed using these credentials.</p>
132      */
GetServiceName()133     inline const Aws::String& GetServiceName() const{ return m_serviceName; }
134 
135     /**
136      * <p>The name of the Amazon Web Services service that is to be associated with the
137      * credentials. The service you specify here is the only service that can be
138      * accessed using these credentials.</p>
139      */
ServiceNameHasBeenSet()140     inline bool ServiceNameHasBeenSet() const { return m_serviceNameHasBeenSet; }
141 
142     /**
143      * <p>The name of the Amazon Web Services service that is to be associated with the
144      * credentials. The service you specify here is the only service that can be
145      * accessed using these credentials.</p>
146      */
SetServiceName(const Aws::String & value)147     inline void SetServiceName(const Aws::String& value) { m_serviceNameHasBeenSet = true; m_serviceName = value; }
148 
149     /**
150      * <p>The name of the Amazon Web Services service that is to be associated with the
151      * credentials. The service you specify here is the only service that can be
152      * accessed using these credentials.</p>
153      */
SetServiceName(Aws::String && value)154     inline void SetServiceName(Aws::String&& value) { m_serviceNameHasBeenSet = true; m_serviceName = std::move(value); }
155 
156     /**
157      * <p>The name of the Amazon Web Services service that is to be associated with the
158      * credentials. The service you specify here is the only service that can be
159      * accessed using these credentials.</p>
160      */
SetServiceName(const char * value)161     inline void SetServiceName(const char* value) { m_serviceNameHasBeenSet = true; m_serviceName.assign(value); }
162 
163     /**
164      * <p>The name of the Amazon Web Services service that is to be associated with the
165      * credentials. The service you specify here is the only service that can be
166      * accessed using these credentials.</p>
167      */
WithServiceName(const Aws::String & value)168     inline CreateServiceSpecificCredentialRequest& WithServiceName(const Aws::String& value) { SetServiceName(value); return *this;}
169 
170     /**
171      * <p>The name of the Amazon Web Services service that is to be associated with the
172      * credentials. The service you specify here is the only service that can be
173      * accessed using these credentials.</p>
174      */
WithServiceName(Aws::String && value)175     inline CreateServiceSpecificCredentialRequest& WithServiceName(Aws::String&& value) { SetServiceName(std::move(value)); return *this;}
176 
177     /**
178      * <p>The name of the Amazon Web Services service that is to be associated with the
179      * credentials. The service you specify here is the only service that can be
180      * accessed using these credentials.</p>
181      */
WithServiceName(const char * value)182     inline CreateServiceSpecificCredentialRequest& WithServiceName(const char* value) { SetServiceName(value); return *this;}
183 
184   private:
185 
186     Aws::String m_userName;
187     bool m_userNameHasBeenSet;
188 
189     Aws::String m_serviceName;
190     bool m_serviceNameHasBeenSet;
191   };
192 
193 } // namespace Model
194 } // namespace IAM
195 } // namespace Aws
196