Skip to content

updateLogKinesis doesn't allow updating any fields #28

Open
@twhid

Description

@twhid

Version

Please provide the version of fastly that you're using.

"fastly": "^7.10.0"

What happened

new Fastly.LoggingKinesisApi().updateLogKinesis doesn't allow updating any fields

This curl works fine:

curl -i -X PUT "https://api.fastly.com/service/<service id>/version/<version>/logging/kinesis/<name>" \
→ -H "Fastly-Key:<key>" \
→ -H "Content-Type: application/x-www-form-urlencoded" \
→ -H "Accept: application/json" \
→ -d "name=updated-name"

But the same thing using the SDK...

await new Fastly.LoggingKinesisApi().updateLogKinesis({
        service_id: 'service id',
        version_id: 'version id',
        logging_kinesis_name: 'name',
        name: 'updated-name',
    });

...results in no update.

Looking at the source, it doesn't allow for any formParams (which is how createLogKinesis evidently works):
https://github.com/fastly/fastly-js/blob/release/v7.10.0/src/api/LoggingKinesisApi.js#L378
vs.
https://github.com/fastly/fastly-js/blob/release/v7.10.0/src/api/LoggingKinesisApi.js#L80

I would like to be able to update the log format. I can work around by implementing my own PUT using fetch or axios or whatever, but was very confused, especially since the docs indicate that at the very least updating the name should work.

https://www.fastly.com/documentation/reference/api/logging/kinesis/#update-log-kinesis

Thanks !

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions