Closed thangdoominh closed 2 months ago
Hi @thangdoominh,
I also got this problem, please update.
Thanks
Hi @thangdoominh and @erricc ,
This arn:*
pattern is common when working with policies. Where you want to apply a policy to a log group and all of its child streams (there are multiple Log Streams per log group). My guess is that the LogGroupArn was added specifically to address this issue of customer passing the arn
field directly. Since changing arn
would have been considered a breaking change, Cloudwatch API team might have added the logGroupArn
to address your concerns.
As far as the arn
field goes, it is documented and is aligned with Cloudwatch's definition of what an arn should look like:
As far as the discrepancy in documentation and modeling goes, I can confirm that this is an issue. In this case the Cloudwatch logs service is returning data that is unmodeled. The SDK (and the AWS docs) are directly code generated from that API model defined by the service. You can see that the internal model is in fact missing the LogGroupArn field you are seeing in the response here.
However, It's not clear to me what is stopping you from using the logGroupArn
if its present on the response?
I'll create an internal ticket with the service team so they can update their model so that the documentation will get updated.
Thanks, Ran~
V1175654541
I use Typescript for my project. So the interface LogGroup
doesn't have the logGroupArn
, so I cannot use like
.
By your confirmation I already work around it. I will follow up on this issue, thank you
This issue is now closed.
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.
Describe the issue
I use DescribeLogGroupsCommand with @aws-sdk/client-cloudwatch-logs for discover the list of Log Groups in AWS Cloudwatch. I saw some differences with a document in the response.
This is the example in the AWS Document:
My response:
logGroupArn
in the response. Its difference with arn field is the arn has:*
and thelogGroupArn
doesn't has. I don't why it has 2 arn.Package version:
"@aws-sdk/client-cloudwatch-logs": "^3.478.0"
Links
https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cloudwatch-logs/command/DescribeLogGroupsCommand/