本文整理汇总了Java中com.amazonaws.services.sns.model.SetTopicAttributesResult类的典型用法代码示例。如果您正苦于以下问题:Java SetTopicAttributesResult类的具体用法?Java SetTopicAttributesResult怎么用?Java SetTopicAttributesResult使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
SetTopicAttributesResult类属于com.amazonaws.services.sns.model包,在下文中一共展示了SetTopicAttributesResult类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testGetSetTopicAttributes_shouldAddAndRespondAttributes
import com.amazonaws.services.sns.model.SetTopicAttributesResult; //导入依赖的package包/类
@Test
public void testGetSetTopicAttributes_shouldAddAndRespondAttributes() {
mockSns(new MockParameters());
CreateTopicResult topicResult = sns.createTopic(new CreateTopicRequest().withName("attributefull-topic"));
SetTopicAttributesResult setAttrResult = sns.setTopicAttributes(topicResult.getTopicArn(), "planet", "Omega 3");
assertNotNull(setAttrResult);
GetTopicAttributesResult topicAttributes = sns.getTopicAttributes(new GetTopicAttributesRequest().withTopicArn(topicResult.getTopicArn()));
assertEquals("verify added attribute is correct", "Omega 3", topicAttributes.getAttributes().get("planet"));
sns.deleteTopic(topicResult.getTopicArn());
}
示例2: setTopicAttributes
import com.amazonaws.services.sns.model.SetTopicAttributesResult; //导入依赖的package包/类
@Override
public SetTopicAttributesResult setTopicAttributes(SetTopicAttributesRequest setTopicAttributesRequest) throws AmazonServiceException, AmazonClientException {
Assert.assertEquals(DEFAULT_TOPIC_ARN, setTopicAttributesRequest.getTopicArn());
Assert.assertEquals("Policy", setTopicAttributesRequest.getAttributeName());
Assert.assertEquals("XXX", setTopicAttributesRequest.getAttributeValue());
return new SetTopicAttributesResult();
}