@@ -4348,6 +4348,67 @@ public ListResourceServersResult listResourceServers(
43484348 }
43494349 }
43504350
4351+ /**
4352+ * <p>
4353+ * Lists the tags that are assigned to an Amazon Cognito user pool.
4354+ * </p>
4355+ * <p>
4356+ * A tag is a label that you can apply to user pools to categorize and
4357+ * manage them in different ways, such as by purpose, owner, environment, or
4358+ * other criteria.
4359+ * </p>
4360+ * <p>
4361+ * You can use this action up to 10 times per second, per account.
4362+ * </p>
4363+ *
4364+ * @param listTagsForResourceRequest
4365+ * @return listTagsForResourceResult The response from the
4366+ * ListTagsForResource service method, as returned by Amazon Cognito
4367+ * Your User Pool.
4368+ * @throws ResourceNotFoundException
4369+ * @throws NotAuthorizedException
4370+ * @throws TooManyRequestsException
4371+ * @throws InvalidParameterException
4372+ * @throws InternalErrorException
4373+ * @throws AmazonClientException If any internal errors are encountered
4374+ * inside the client while attempting to make the request or
4375+ * handle the response. For example if a network connection is
4376+ * not available.
4377+ * @throws AmazonServiceException If an error response is returned by Amazon
4378+ * Cognito Your User Pool indicating either a problem with the
4379+ * data in the request, or a server side issue.
4380+ */
4381+ public ListTagsForResourceResult listTagsForResource (
4382+ ListTagsForResourceRequest listTagsForResourceRequest )
4383+ throws AmazonServiceException , AmazonClientException {
4384+ ExecutionContext executionContext = createExecutionContext (listTagsForResourceRequest );
4385+ AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics ();
4386+ awsRequestMetrics .startEvent (Field .ClientExecuteTime );
4387+ Request <ListTagsForResourceRequest > request = null ;
4388+ Response <ListTagsForResourceResult > response = null ;
4389+ try {
4390+ awsRequestMetrics .startEvent (Field .RequestMarshallTime );
4391+ try {
4392+ request = new ListTagsForResourceRequestMarshaller ()
4393+ .marshall (listTagsForResourceRequest );
4394+ // Binds the request metrics to the current request.
4395+ request .setAWSRequestMetrics (awsRequestMetrics );
4396+ } finally {
4397+ awsRequestMetrics .endEvent (Field .RequestMarshallTime );
4398+ }
4399+ Unmarshaller <ListTagsForResourceResult , JsonUnmarshallerContext > unmarshaller = new ListTagsForResourceResultJsonUnmarshaller ();
4400+ JsonResponseHandler <ListTagsForResourceResult > responseHandler = new JsonResponseHandler <ListTagsForResourceResult >(
4401+ unmarshaller );
4402+
4403+ response = invoke (request , responseHandler , executionContext );
4404+
4405+ return response .getAwsResponse ();
4406+ } finally {
4407+ awsRequestMetrics .endEvent (Field .ClientExecuteTime );
4408+ endClientExecution (awsRequestMetrics , request , response , LOGGING_AWS_REQUEST_METRIC );
4409+ }
4410+ }
4411+
43514412 /**
43524413 * <p>
43534414 * Lists the user import jobs.
@@ -5220,6 +5281,128 @@ public StopUserImportJobResult stopUserImportJob(
52205281 }
52215282 }
52225283
5284+ /**
5285+ * <p>
5286+ * Assigns a set of tags to an Amazon Cognito user pool. A tag is a label
5287+ * that you can use to categorize and manage user pools in different ways,
5288+ * such as by purpose, owner, environment, or other criteria.
5289+ * </p>
5290+ * <p>
5291+ * Each tag consists of a key and value, both of which you define. A key is
5292+ * a general category for more specific values. For example, if you have two
5293+ * versions of a user pool, one for testing and another for production, you
5294+ * might assign an <code>Environment</code> tag key to both user pools. The
5295+ * value of this key might be <code>Test</code> for one user pool and
5296+ * <code>Production</code> for the other.
5297+ * </p>
5298+ * <p>
5299+ * Tags are useful for cost tracking and access control. You can activate
5300+ * your tags so that they appear on the Billing and Cost Management console,
5301+ * where you can track the costs associated with your user pools. In an IAM
5302+ * policy, you can constrain permissions for user pools based on specific
5303+ * tags or tag values.
5304+ * </p>
5305+ * <p>
5306+ * You can use this action up to 5 times per second, per account. A user
5307+ * pool can have as many as 50 tags.
5308+ * </p>
5309+ *
5310+ * @param tagResourceRequest
5311+ * @return tagResourceResult The response from the TagResource service
5312+ * method, as returned by Amazon Cognito Your User Pool.
5313+ * @throws ResourceNotFoundException
5314+ * @throws NotAuthorizedException
5315+ * @throws TooManyRequestsException
5316+ * @throws InvalidParameterException
5317+ * @throws InternalErrorException
5318+ * @throws AmazonClientException If any internal errors are encountered
5319+ * inside the client while attempting to make the request or
5320+ * handle the response. For example if a network connection is
5321+ * not available.
5322+ * @throws AmazonServiceException If an error response is returned by Amazon
5323+ * Cognito Your User Pool indicating either a problem with the
5324+ * data in the request, or a server side issue.
5325+ */
5326+ public TagResourceResult tagResource (TagResourceRequest tagResourceRequest )
5327+ throws AmazonServiceException , AmazonClientException {
5328+ ExecutionContext executionContext = createExecutionContext (tagResourceRequest );
5329+ AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics ();
5330+ awsRequestMetrics .startEvent (Field .ClientExecuteTime );
5331+ Request <TagResourceRequest > request = null ;
5332+ Response <TagResourceResult > response = null ;
5333+ try {
5334+ awsRequestMetrics .startEvent (Field .RequestMarshallTime );
5335+ try {
5336+ request = new TagResourceRequestMarshaller ().marshall (tagResourceRequest );
5337+ // Binds the request metrics to the current request.
5338+ request .setAWSRequestMetrics (awsRequestMetrics );
5339+ } finally {
5340+ awsRequestMetrics .endEvent (Field .RequestMarshallTime );
5341+ }
5342+ Unmarshaller <TagResourceResult , JsonUnmarshallerContext > unmarshaller = new TagResourceResultJsonUnmarshaller ();
5343+ JsonResponseHandler <TagResourceResult > responseHandler = new JsonResponseHandler <TagResourceResult >(
5344+ unmarshaller );
5345+
5346+ response = invoke (request , responseHandler , executionContext );
5347+
5348+ return response .getAwsResponse ();
5349+ } finally {
5350+ awsRequestMetrics .endEvent (Field .ClientExecuteTime );
5351+ endClientExecution (awsRequestMetrics , request , response , LOGGING_AWS_REQUEST_METRIC );
5352+ }
5353+ }
5354+
5355+ /**
5356+ * <p>
5357+ * Removes the specified tags from an Amazon Cognito user pool. You can use
5358+ * this action up to 5 times per second, per account
5359+ * </p>
5360+ *
5361+ * @param untagResourceRequest
5362+ * @return untagResourceResult The response from the UntagResource service
5363+ * method, as returned by Amazon Cognito Your User Pool.
5364+ * @throws ResourceNotFoundException
5365+ * @throws NotAuthorizedException
5366+ * @throws TooManyRequestsException
5367+ * @throws InvalidParameterException
5368+ * @throws InternalErrorException
5369+ * @throws AmazonClientException If any internal errors are encountered
5370+ * inside the client while attempting to make the request or
5371+ * handle the response. For example if a network connection is
5372+ * not available.
5373+ * @throws AmazonServiceException If an error response is returned by Amazon
5374+ * Cognito Your User Pool indicating either a problem with the
5375+ * data in the request, or a server side issue.
5376+ */
5377+ public UntagResourceResult untagResource (UntagResourceRequest untagResourceRequest )
5378+ throws AmazonServiceException , AmazonClientException {
5379+ ExecutionContext executionContext = createExecutionContext (untagResourceRequest );
5380+ AWSRequestMetrics awsRequestMetrics = executionContext .getAwsRequestMetrics ();
5381+ awsRequestMetrics .startEvent (Field .ClientExecuteTime );
5382+ Request <UntagResourceRequest > request = null ;
5383+ Response <UntagResourceResult > response = null ;
5384+ try {
5385+ awsRequestMetrics .startEvent (Field .RequestMarshallTime );
5386+ try {
5387+ request = new UntagResourceRequestMarshaller ().marshall (untagResourceRequest );
5388+ // Binds the request metrics to the current request.
5389+ request .setAWSRequestMetrics (awsRequestMetrics );
5390+ } finally {
5391+ awsRequestMetrics .endEvent (Field .RequestMarshallTime );
5392+ }
5393+ Unmarshaller <UntagResourceResult , JsonUnmarshallerContext > unmarshaller = new UntagResourceResultJsonUnmarshaller ();
5394+ JsonResponseHandler <UntagResourceResult > responseHandler = new JsonResponseHandler <UntagResourceResult >(
5395+ unmarshaller );
5396+
5397+ response = invoke (request , responseHandler , executionContext );
5398+
5399+ return response .getAwsResponse ();
5400+ } finally {
5401+ awsRequestMetrics .endEvent (Field .ClientExecuteTime );
5402+ endClientExecution (awsRequestMetrics , request , response , LOGGING_AWS_REQUEST_METRIC );
5403+ }
5404+ }
5405+
52235406 /**
52245407 * <p>
52255408 * Provides the feedback for an authentication event whether it was from a
@@ -5725,7 +5908,7 @@ public UpdateUserPoolClientResult updateUserPoolClient(
57255908 * <p>
57265909 * For more information about adding a custom domain to your user pool, see
57275910 * <a href=
5728- * "http ://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-add-custom-domain.html"
5911+ * "https ://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-add-custom-domain.html"
57295912 * >Using Your Own Domain for the Hosted UI</a>.
57305913 * </p>
57315914 *
0 commit comments