Amazon.SimpleNotificationService.AmazonSimpleNotificationServiceClient.GetEndpointAttributes C# (CSharp) Метод

GetEndpointAttributes() публичный Метод

Retrieves the endpoint attributes for a device on one of the supported push notification services, such as GCM and APNS. For more information, see Using Amazon SNS Mobile Push Notifications.
/// Indicates that the user has been denied access to the requested resource. /// /// Indicates an internal service error. /// /// Indicates that a request parameter does not comply with the associated constraints. /// /// Indicates that the requested resource does not exist. ///
public GetEndpointAttributes ( GetEndpointAttributesRequest request ) : GetEndpointAttributesResponse
request Amazon.SimpleNotificationService.Model.GetEndpointAttributesRequest Container for the necessary parameters to execute the GetEndpointAttributes service method.
Результат Amazon.SimpleNotificationService.Model.GetEndpointAttributesResponse
        public GetEndpointAttributesResponse GetEndpointAttributes(GetEndpointAttributesRequest request)
        {
            var marshaller = new GetEndpointAttributesRequestMarshaller();
            var unmarshaller = GetEndpointAttributesResponseUnmarshaller.Instance;

            return Invoke<GetEndpointAttributesRequest,GetEndpointAttributesResponse>(request, marshaller, unmarshaller);
        }

Usage Example

        public IDictionary<string, string> GetEndpointAttributes(string endpointarn)
        {
            try
            {

                using (var snsclient = new AmazonSimpleNotificationServiceClient(_accesskey, _secretkey))
                {
                    var result = snsclient.GetEndpointAttributes(new GetEndpointAttributesRequest()
                    {
                        EndpointArn = endpointarn
                    });

                    return result.Attributes;
                }
            }
            catch (Exception ex)
            {
                throw new Exception("GetEndpointAttributes " + ex.Message);
            }
        }
AmazonSimpleNotificationServiceClient