本文整理汇总了Java中com.amazonaws.services.sns.model.GetSubscriptionAttributesResult类的典型用法代码示例。如果您正苦于以下问题:Java GetSubscriptionAttributesResult类的具体用法?Java GetSubscriptionAttributesResult怎么用?Java GetSubscriptionAttributesResult使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
GetSubscriptionAttributesResult类属于com.amazonaws.services.sns.model包,在下文中一共展示了GetSubscriptionAttributesResult类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testSetGetSubscriptionAttributes_shouldSetAndRespondSubscriptionAttributes
import com.amazonaws.services.sns.model.GetSubscriptionAttributesResult; //导入依赖的package包/类
@Test
public void testSetGetSubscriptionAttributes_shouldSetAndRespondSubscriptionAttributes() {
mockSns(new MockParameters());
// create topic and subscription
CreateTopicResult topicResult = sns.createTopic(new CreateTopicRequest().withName("important-topic"));
SubscribeResult subscribeResult = sns.subscribe(new SubscribeRequest().withTopicArn(topicResult.getTopicArn())
.withProtocol("sqs").withEndpoint("arn:aws:sqs:us-east-1:123456789012:queue1"));
// set subscription attribute
SetSubscriptionAttributesResult setAttrResult = sns.setSubscriptionAttributes(new SetSubscriptionAttributesRequest()
.withAttributeName("unicorns-exist").withAttributeValue("only in scotland").withSubscriptionArn(subscribeResult.getSubscriptionArn()));
assertNotNull("verify setting attributes result", setAttrResult);
// get subscription attribute
GetSubscriptionAttributesResult subAttributes = sns.getSubscriptionAttributes(new GetSubscriptionAttributesRequest()
.withSubscriptionArn(subscribeResult.getSubscriptionArn()));
assertEquals("verify subscription attribute","only in scotland",subAttributes.getAttributes().get("unicorns-exist"));
}
示例2: load
import com.amazonaws.services.sns.model.GetSubscriptionAttributesResult; //导入依赖的package包/类
@Override
public boolean load(GetSubscriptionAttributesRequest request,
ResultCapture<GetSubscriptionAttributesResult> extractor) {
return resource.load(request, extractor);
}
示例3: load
import com.amazonaws.services.sns.model.GetSubscriptionAttributesResult; //导入依赖的package包/类
/**
* Makes a call to the service to load this resource's attributes if they
* are not loaded yet, and use a ResultCapture to retrieve the low-level
* client response
* The following request parameters will be populated from the data of this
* <code>Subscription</code> resource, and any conflicting parameter value
* set in the request will be overridden:
* <ul>
* <li>
* <b><code>SubscriptionArn</code></b>
* - mapped from the <code>Arn</code> identifier.
* </li>
* </ul>
*
* <p>
*
* @return Returns {@code true} if the resource is not yet loaded when this
* method was invoked, which indicates that a service call has been
* made to retrieve the attributes.
* @see GetSubscriptionAttributesRequest
*/
boolean load(GetSubscriptionAttributesRequest request,
ResultCapture<GetSubscriptionAttributesResult> extractor);