GithubHelp home page GithubHelp logo

paloaltonetworks / prisma-cloud-go Goto Github PK

View Code? Open in Web Editor NEW
14.0 11.0 31.0 168 KB

Prisma Cloud SDK in Go

License: Mozilla Public License 2.0

Makefile 0.07% Go 99.93%
prisma-cloud terraform-provider

prisma-cloud-go's Introduction

prisma-cloud-go

GoDoc Build

Prisma Cloud SDK in Go

prisma-cloud-go's People

Contributors

aadilpanw avatar anushreehs avatar ebeuerle avatar hross-frae avatar ndhemiwal avatar nikitapanw avatar shinmog avatar sunkavillisuranya avatar trishala1999 avatar ushapriya2001 avatar vsingh4panw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

prisma-cloud-go's Issues

Add ```fields``` field to alert Request

( not sure where to put this, the documentation seems correct so I guess it only affects this implementation)

Describe the bug

The documentation for the Alerts API specifies a fields field, that's not present in the Request structure in v0.4.2 here.

Expected behavior

That structures in the SDK reflect the API documentation.

Current behavior

The SDK in its current state doesn't reflect the documented API.

Possible solution

Add missing fields.

Steps to reproduce

n/a

Screenshots

Current structure:
type Request struct { TimeRange timerange.TimeRange json:"timeRange"Limit int json:"limit,omitempty"Offset int json:"offset,omitempty"Detailed bool json:"detailed"PageToken string json:"pageToken,omitempty"SortBy []string json:"sortBy,omitempty"Filters []Filter json:"filters,omitempty" }

Context

When calling the API, responses can grow very large, and I'm trying to reduce the memory impact on the client (which crashes sometimes). In order to do this, I'd like to scope down the response to what I need.

Your Environment

  • Version used: v0.4.2

Thanks you :)

CloudQuery Source Plugin?

Hi Team, hopefully this is right place to ask, if not, I'd appreciate if you can direct me.

I'm the founder of cloudquery.io, a high performance open source ELT framework.

Our users are interested in a Prisma CloudQuery Source plugin, but as we cannot maintain all the plugins ourselves, I was curious if this would be an interesting collaboration, where we would help implement an initial source plugin, and you will help maintain it.

This will give your users the ability to sync Prisma alerts/apis to any of their datalakes/data-warehouses/databases easily using any of the growing list of CQ destination plugins.

Best,
Yevgeny

Client returns error from `switch resp.StatusCode` for 503 response without retry and fails to unmarshal

Describe the bug

2023-12-12T20:31:26.489Z [ERROR] vertex "prismacloud_policy.example" error: 503 error, and could not unmarshal header "{\"severity\":\"ERROR\",\"i18nKey\":\"service_unavailable\"}": json: cannot unmarshal object into Go value of type []prismacloud.PrismaCloudError

Expected behavior

The provider should retry on 503 status code and correctly unmarshal the header. It seems like the code change may belong within the client status code switch.

Current behavior

On 503 response code, functions such as policy.Get return an error without any retry.

Possible solution

Retry with expontential backoff and if it fails after say, five, attempts return the error.

Steps to reproduce

Use prismacloud in China....

Context

Using the policy resource on the prismacloud terraform provider

Your Environment

PrismaCloud China tends to get a lot of 503 errors.

[Community Health Assessment] Changes needed

Health Check Pass Score More Info
Contains a meaningful README.md file 20 / 20 More info
SUPPORT.md file exists 20 / 20 More info
Repo has a description 15 / 15 More info
Has a recognized open source license 15 / 15 More info
Has a descriptive repo name 15 / 15 More info
Required topics attached to repo 15 / 15 More info
CONTRIBUTING.md file with contribution guidelines 0 / 5 More info
Has custom issue and pull request templates 0 / 5 More info

Current score: 100
Target threshold: 100
Total possible: 110

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.