free requests in demo
This commit is contained in:
parent
86b8815051
commit
687880f27e
|
@ -321,6 +321,7 @@ pub fn Request(comptime action: anytype) type {
|
|||
};
|
||||
}
|
||||
|
||||
/// Get request ID from headers. Caller responsible for freeing memory
|
||||
fn requestIdFromHeaders(request: awshttp.HttpRequest, response: awshttp.HttpResult, options: Options) ![]u8 {
|
||||
var request_id: []u8 = undefined;
|
||||
var found = false;
|
||||
|
|
|
@ -150,10 +150,12 @@ pub fn main() anyerror!void {
|
|||
tags.appendAssumeCapacity(.{ .key = "Foo", .value = "Bar" });
|
||||
const req = services.lambda.tag_resource.Request{ .resource = arn, .tags = tags.items };
|
||||
const addtag = try aws.Request(services.lambda.tag_resource).call(req, options);
|
||||
defer addtag.deinit();
|
||||
// const addtag = try client.call(services.lambda.tag_resource.Request{ .resource = arn, .tags = &.{.{ .key = "Foo", .value = "Bar" }} }, options);
|
||||
std.log.info("add tag request id: {s}", .{addtag.response_metadata.request_id});
|
||||
var keys = [_][]const u8{"Foo"}; // Would love to have a way to express this without burning a var here
|
||||
const deletetag = try aws.Request(services.lambda.untag_resource).call(.{ .tag_keys = keys[0..], .resource = arn }, options);
|
||||
defer deletetag.deinit();
|
||||
std.log.info("delete tag request id: {s}", .{deletetag.response_metadata.request_id});
|
||||
} else {
|
||||
std.log.err("no functions to work with", .{});
|
||||
|
|
Loading…
Reference in New Issue
Block a user