Using MessageAttributes in AWS SNS Post request - amazon-sns

I am trying to use the MessageAttributes parameter in AWS SNS POST request. This is to customize the Sender ID (by AWS.SNS.SMS.SenderID). I am trying for Germany phone number and hence is allowed to customize the Sender ID. Can any one help me with the correct syntax?
Thanks,
Subhajit

You need to send 3 key/value pairs for each attribute:
MessageAttributes.entry.${index}.Name=${attributeName}&
MessageAttributes.entry.${index}.Value.DataType=String&
MessageAttributes.entry.${index}.Value.StringValue=${attributeValue}
${index} is the numerical index of each attribute, starting with 1
On the second line you need to specify the type of the value. Most common cases are String.
The third line is the actual value. You can see more information in the link above, I have only used strings and StringValue.
All the values need to be url-encoded for obvious reasons.

I was able to solve it using the following:
MessageAttributes.entry.N.Name (key)
MessageAttributes.entry.N.Value (value)

Related

Kibana: How to aggregate for all UUIDs

I am tracking my url hit counts and want to aggregate them.
I have a few URL as follows:
example.com/service/{uuid}
when I view in Kibana it lists out the total hit count of each URL individually so my table has something like:
example.com/homepage 100 count
example.com/service/uuid1 10 count
example.com/service/uuid2 5 count
Is there an easy way to combine all uuids into 1 entry?
I was thinking of replacing uuids with a static string, however the admins blocked regex support making the replacement very difficult. So I am trying to see if there is any other way before doing that.
Thanks!
I would suggest to create a new field with scripted fields.
The new field would return value: example.com/service/uuid if the url contains the word uuid. Otherwise it will return the url as it is.
Then you could do the aggregation on the new field.

wrong syntax at http parameter values

The next hyperlink is supposed to give me the users with ids 001 and 002.
http://localhost:9000/users?myIds=001;002
Is there a problem with the semicolon? the controller is showing receiving only 001 but not 002.
Thanks
You can't pass multiple values into a single GET parameter; you have to separate them out using an ampersand (&):
http://localhost:9000/users?id1=001&id2=002
Then you can access the IDs with id1 and id2 respectively.
If you specifically need to pass a string with a semicolon as a GET parameter, you need to use the HTML entity %3B instead:
http://localhost:9000/users?id1=001%3B002

Set SSRS Report Parameter value with passed Querystring value in SSRS

I have one report, in which I have 13 parameters that fetch the data from Database. I want to set only one Parameter value from Query-string URL.
For example in my case I want to set UserID value to passed Query-string value in SSRS report.
Is it possible to set only one parameter from Query-string and rest of the parameters will be bind with report's Dataset.
can anyone please suggest me the best solution to achieve. Thanks!
It is possible to have some query parameters and some dataset parameters...but its always good idea to create in backend itself. The reason is your fetching all data from backend and filtering out in frontend..if data is more every time report need to pull all data from backend.
This is possible as long as you have default values for the other 12 parameters.
I was facing this issue because I have set two values in Available fields ="y" and ="n"
And In default values ="y"
This is why it was showing disabled. But after removing this " from each values it is working fine now.
So we just need to use Y and N

How can I get results for a dimension (custom variables), where the value is not set?

I am using custom variables to track order ids. In order to aggregate analytics data into out data warehouse, I want to select a number of metrics with the custom variable as a dimension. However, if I do so, I will not get the entries where the variable is not set (E.g. sessions that didn't result in a sale). I need to get these as well.
Can I write a filter or segment that selects only the entries that doesn't have a particular custom variable? I have tried:
segment=dynamic::ga:customVarValue1==
But that doesn't seem to work (It gives no results back).
Basically I'm looking for the equivalent to where ga:customVarValue1 is null in sql.
In short, it's not possible to get the nullset data, as explained by a Google rep:
For some dimensions, GA uses the default value of (not set).
Custom Variable do not have a default value, so if a hit does not have a
custom variable associated with it, all the other dimensions in the query
are not added to the reports.
The original answer is a little confusing, but when you read between the lines it suggests that they throw out these "empty" values when they run their aggregates.
The "correct" approach, as he explains, is to set a default value for any row you want reported:
If you need to see the (not set) value, you could try sending a default
value for custom variables.
For example if you use visitor level custom vars to track member vs
non-member, you should always set non-member as a default for everybody;
then modify to member once they register.
Details are here: http://groups.google.com/group/google-analytics-data-export-api/browse_thread/thread/cd078ddb26ca18d5?pli=1
I've just had some success solving this by using a Regex to capture users or sessions where the custom dimension has no value. In my case I want to separate logged in and logged out users.
The Regex .+ will capture any non-empty value, so can be used to get the job done.
The filters for my Returning users segment is matches regex: .+ like this:
For the Customer prospects I used: does not match regex: .+ like this:
It's early days, but this appears to be working:

Using / in query strings

I am trying to use query strings in ASP.NET. I have a requirement of the following format
http://localhost/website/1/?callback=?
Here 1 denotes the ID of the profile. This means some info from id=1 will be fetched through the string
If this would have been website/2/?callback=? , then the id would be 2. My questions is to how do I use this /id/ as a query string so it can be used to fetch the profile ID. This was my first preference to use /id/ format otherwise I could look into fetching using two ?'s
If the id =1, I want to fetch ID=1 particulars from DB on this page. http://localhost/website/1/?callback=?
In your case the ID is in the PATH, not the query string. You can access the path via Request.Path in an ASPX page. From there you would need to do some string parsing to get at the portion of the path where you expect the ID to be.
In your case I would probably use something like int.Parse(Request.Path.Split(new char[] {'/'}, StringSplitOptions.RemoveEmptyEntries)[1]), but please note that I've made that line pretty dense for brevity's sake. For starters, you should use int.TryParse() instead of int.Parse(). This code assumes that the ID will always be in the same place in the url. For example, it will work for "/website/2/" and "/user/2/", but not for "/website/somethingelse/2/".
UriTemplate might be a good choice for that sort of parsing. Not to mention, probably a bit more clear and explicit about what's happening.
Check out: http://msdn.microsoft.com/en-us/library/system.uritemplate(v=VS.90).aspx

Resources