mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-06 22:18:28 +00:00
Update Go AWS SDK to the latest version
This commit is contained in:
committed by
Andrey Smirnov
parent
d08be990ef
commit
94a72b23ff
+9711
File diff suppressed because it is too large
Load Diff
+45
@@ -0,0 +1,45 @@
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package securityhub provides the client and types for making API
|
||||
// requests to AWS SecurityHub.
|
||||
//
|
||||
// Security Hub provides you with a comprehensive view of the security state
|
||||
// of your AWS environment and resources. It also provides you with the compliance
|
||||
// status of your environment based on CIS AWS Foundations compliance checks.
|
||||
// Security Hub collects security data from AWS accounts, services, and integrated
|
||||
// third-party products and helps you analyze security trends in your environment
|
||||
// to identify the highest priority security issues. For more information about
|
||||
// Security Hub, see the AWS Security Hub User Guide (https://docs.aws.amazon.com/securityhub/latest/userguide/what-is-securityhub.html) .
|
||||
//
|
||||
// When you use operations in the Security Hub API, the requests are executed
|
||||
// only in the AWS Region that is currently active or in the specific AWS Region
|
||||
// that you specify in your request. Any configuration or settings change that
|
||||
// results from the operation is applied only to that Region. To make the same
|
||||
// change in other Regions, execute the same command for each Region to apply
|
||||
// the change to. For example, if your Region is set to us-west-2, when you
|
||||
// use CreateMembers to add a member account to Security Hub, the association
|
||||
// of the member account with the master account is created only in the us-west-2
|
||||
// Region. Security Hub must be enabled for the member account in the same Region
|
||||
// that the invite was sent from.
|
||||
//
|
||||
// See https://docs.aws.amazon.com/goto/WebAPI/securityhub-2018-10-26 for more information on this service.
|
||||
//
|
||||
// See securityhub package documentation for more information.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/securityhub/
|
||||
//
|
||||
// Using the Client
|
||||
//
|
||||
// To contact AWS SecurityHub with the SDK use the New function to create
|
||||
// a new service client. With that client you can make API requests to the service.
|
||||
// These clients are safe to use concurrently.
|
||||
//
|
||||
// See the SDK's documentation for more information on how to use the SDK.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/
|
||||
//
|
||||
// See aws.Config documentation for more information on configuring SDK clients.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
|
||||
//
|
||||
// See the AWS SecurityHub client SecurityHub for more
|
||||
// information on creating client for this service.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/securityhub/#New
|
||||
package securityhub
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package securityhub
|
||||
|
||||
const (
|
||||
|
||||
// ErrCodeAccessDeniedException for service response error code
|
||||
// "AccessDeniedException".
|
||||
//
|
||||
// You don't have permission to perform the action specified in the request.
|
||||
ErrCodeAccessDeniedException = "AccessDeniedException"
|
||||
|
||||
// ErrCodeInternalException for service response error code
|
||||
// "InternalException".
|
||||
//
|
||||
// Internal server error.
|
||||
ErrCodeInternalException = "InternalException"
|
||||
|
||||
// ErrCodeInvalidAccessException for service response error code
|
||||
// "InvalidAccessException".
|
||||
//
|
||||
// AWS Security Hub isn't enabled for the account used to make this request.
|
||||
ErrCodeInvalidAccessException = "InvalidAccessException"
|
||||
|
||||
// ErrCodeInvalidInputException for service response error code
|
||||
// "InvalidInputException".
|
||||
//
|
||||
// The request was rejected because you supplied an invalid or out-of-range
|
||||
// value for an input parameter.
|
||||
ErrCodeInvalidInputException = "InvalidInputException"
|
||||
|
||||
// ErrCodeLimitExceededException for service response error code
|
||||
// "LimitExceededException".
|
||||
//
|
||||
// The request was rejected because it attempted to create resources beyond
|
||||
// the current AWS account limits. The error code describes the limit exceeded.
|
||||
ErrCodeLimitExceededException = "LimitExceededException"
|
||||
|
||||
// ErrCodeResourceConflictException for service response error code
|
||||
// "ResourceConflictException".
|
||||
//
|
||||
// The resource specified in the request conflicts with an existing resource.
|
||||
ErrCodeResourceConflictException = "ResourceConflictException"
|
||||
|
||||
// ErrCodeResourceNotFoundException for service response error code
|
||||
// "ResourceNotFoundException".
|
||||
//
|
||||
// The request was rejected because we can't find the specified resource.
|
||||
ErrCodeResourceNotFoundException = "ResourceNotFoundException"
|
||||
)
|
||||
Generated
Vendored
+231
@@ -0,0 +1,231 @@
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package securityhubiface provides an interface to enable mocking the AWS SecurityHub service client
|
||||
// for testing your code.
|
||||
//
|
||||
// It is important to note that this interface will have breaking changes
|
||||
// when the service model is updated and adds new API operations, paginators,
|
||||
// and waiters.
|
||||
package securityhubiface
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/service/securityhub"
|
||||
)
|
||||
|
||||
// SecurityHubAPI provides an interface to enable mocking the
|
||||
// securityhub.SecurityHub service client's API operation,
|
||||
// paginators, and waiters. This make unit testing your code that calls out
|
||||
// to the SDK's service client's calls easier.
|
||||
//
|
||||
// The best way to use this interface is so the SDK's service client's calls
|
||||
// can be stubbed out for unit testing your code with the SDK without needing
|
||||
// to inject custom request handlers into the SDK's request pipeline.
|
||||
//
|
||||
// // myFunc uses an SDK service client to make a request to
|
||||
// // AWS SecurityHub.
|
||||
// func myFunc(svc securityhubiface.SecurityHubAPI) bool {
|
||||
// // Make svc.AcceptInvitation request
|
||||
// }
|
||||
//
|
||||
// func main() {
|
||||
// sess := session.New()
|
||||
// svc := securityhub.New(sess)
|
||||
//
|
||||
// myFunc(svc)
|
||||
// }
|
||||
//
|
||||
// In your _test.go file:
|
||||
//
|
||||
// // Define a mock struct to be used in your unit tests of myFunc.
|
||||
// type mockSecurityHubClient struct {
|
||||
// securityhubiface.SecurityHubAPI
|
||||
// }
|
||||
// func (m *mockSecurityHubClient) AcceptInvitation(input *securityhub.AcceptInvitationInput) (*securityhub.AcceptInvitationOutput, error) {
|
||||
// // mock response/functionality
|
||||
// }
|
||||
//
|
||||
// func TestMyFunc(t *testing.T) {
|
||||
// // Setup Test
|
||||
// mockSvc := &mockSecurityHubClient{}
|
||||
//
|
||||
// myfunc(mockSvc)
|
||||
//
|
||||
// // Verify myFunc's functionality
|
||||
// }
|
||||
//
|
||||
// It is important to note that this interface will have breaking changes
|
||||
// when the service model is updated and adds new API operations, paginators,
|
||||
// and waiters. Its suggested to use the pattern above for testing, or using
|
||||
// tooling to generate mocks to satisfy the interfaces.
|
||||
type SecurityHubAPI interface {
|
||||
AcceptInvitation(*securityhub.AcceptInvitationInput) (*securityhub.AcceptInvitationOutput, error)
|
||||
AcceptInvitationWithContext(aws.Context, *securityhub.AcceptInvitationInput, ...request.Option) (*securityhub.AcceptInvitationOutput, error)
|
||||
AcceptInvitationRequest(*securityhub.AcceptInvitationInput) (*request.Request, *securityhub.AcceptInvitationOutput)
|
||||
|
||||
BatchDisableStandards(*securityhub.BatchDisableStandardsInput) (*securityhub.BatchDisableStandardsOutput, error)
|
||||
BatchDisableStandardsWithContext(aws.Context, *securityhub.BatchDisableStandardsInput, ...request.Option) (*securityhub.BatchDisableStandardsOutput, error)
|
||||
BatchDisableStandardsRequest(*securityhub.BatchDisableStandardsInput) (*request.Request, *securityhub.BatchDisableStandardsOutput)
|
||||
|
||||
BatchEnableStandards(*securityhub.BatchEnableStandardsInput) (*securityhub.BatchEnableStandardsOutput, error)
|
||||
BatchEnableStandardsWithContext(aws.Context, *securityhub.BatchEnableStandardsInput, ...request.Option) (*securityhub.BatchEnableStandardsOutput, error)
|
||||
BatchEnableStandardsRequest(*securityhub.BatchEnableStandardsInput) (*request.Request, *securityhub.BatchEnableStandardsOutput)
|
||||
|
||||
BatchImportFindings(*securityhub.BatchImportFindingsInput) (*securityhub.BatchImportFindingsOutput, error)
|
||||
BatchImportFindingsWithContext(aws.Context, *securityhub.BatchImportFindingsInput, ...request.Option) (*securityhub.BatchImportFindingsOutput, error)
|
||||
BatchImportFindingsRequest(*securityhub.BatchImportFindingsInput) (*request.Request, *securityhub.BatchImportFindingsOutput)
|
||||
|
||||
CreateActionTarget(*securityhub.CreateActionTargetInput) (*securityhub.CreateActionTargetOutput, error)
|
||||
CreateActionTargetWithContext(aws.Context, *securityhub.CreateActionTargetInput, ...request.Option) (*securityhub.CreateActionTargetOutput, error)
|
||||
CreateActionTargetRequest(*securityhub.CreateActionTargetInput) (*request.Request, *securityhub.CreateActionTargetOutput)
|
||||
|
||||
CreateInsight(*securityhub.CreateInsightInput) (*securityhub.CreateInsightOutput, error)
|
||||
CreateInsightWithContext(aws.Context, *securityhub.CreateInsightInput, ...request.Option) (*securityhub.CreateInsightOutput, error)
|
||||
CreateInsightRequest(*securityhub.CreateInsightInput) (*request.Request, *securityhub.CreateInsightOutput)
|
||||
|
||||
CreateMembers(*securityhub.CreateMembersInput) (*securityhub.CreateMembersOutput, error)
|
||||
CreateMembersWithContext(aws.Context, *securityhub.CreateMembersInput, ...request.Option) (*securityhub.CreateMembersOutput, error)
|
||||
CreateMembersRequest(*securityhub.CreateMembersInput) (*request.Request, *securityhub.CreateMembersOutput)
|
||||
|
||||
DeclineInvitations(*securityhub.DeclineInvitationsInput) (*securityhub.DeclineInvitationsOutput, error)
|
||||
DeclineInvitationsWithContext(aws.Context, *securityhub.DeclineInvitationsInput, ...request.Option) (*securityhub.DeclineInvitationsOutput, error)
|
||||
DeclineInvitationsRequest(*securityhub.DeclineInvitationsInput) (*request.Request, *securityhub.DeclineInvitationsOutput)
|
||||
|
||||
DeleteActionTarget(*securityhub.DeleteActionTargetInput) (*securityhub.DeleteActionTargetOutput, error)
|
||||
DeleteActionTargetWithContext(aws.Context, *securityhub.DeleteActionTargetInput, ...request.Option) (*securityhub.DeleteActionTargetOutput, error)
|
||||
DeleteActionTargetRequest(*securityhub.DeleteActionTargetInput) (*request.Request, *securityhub.DeleteActionTargetOutput)
|
||||
|
||||
DeleteInsight(*securityhub.DeleteInsightInput) (*securityhub.DeleteInsightOutput, error)
|
||||
DeleteInsightWithContext(aws.Context, *securityhub.DeleteInsightInput, ...request.Option) (*securityhub.DeleteInsightOutput, error)
|
||||
DeleteInsightRequest(*securityhub.DeleteInsightInput) (*request.Request, *securityhub.DeleteInsightOutput)
|
||||
|
||||
DeleteInvitations(*securityhub.DeleteInvitationsInput) (*securityhub.DeleteInvitationsOutput, error)
|
||||
DeleteInvitationsWithContext(aws.Context, *securityhub.DeleteInvitationsInput, ...request.Option) (*securityhub.DeleteInvitationsOutput, error)
|
||||
DeleteInvitationsRequest(*securityhub.DeleteInvitationsInput) (*request.Request, *securityhub.DeleteInvitationsOutput)
|
||||
|
||||
DeleteMembers(*securityhub.DeleteMembersInput) (*securityhub.DeleteMembersOutput, error)
|
||||
DeleteMembersWithContext(aws.Context, *securityhub.DeleteMembersInput, ...request.Option) (*securityhub.DeleteMembersOutput, error)
|
||||
DeleteMembersRequest(*securityhub.DeleteMembersInput) (*request.Request, *securityhub.DeleteMembersOutput)
|
||||
|
||||
DescribeActionTargets(*securityhub.DescribeActionTargetsInput) (*securityhub.DescribeActionTargetsOutput, error)
|
||||
DescribeActionTargetsWithContext(aws.Context, *securityhub.DescribeActionTargetsInput, ...request.Option) (*securityhub.DescribeActionTargetsOutput, error)
|
||||
DescribeActionTargetsRequest(*securityhub.DescribeActionTargetsInput) (*request.Request, *securityhub.DescribeActionTargetsOutput)
|
||||
|
||||
DescribeActionTargetsPages(*securityhub.DescribeActionTargetsInput, func(*securityhub.DescribeActionTargetsOutput, bool) bool) error
|
||||
DescribeActionTargetsPagesWithContext(aws.Context, *securityhub.DescribeActionTargetsInput, func(*securityhub.DescribeActionTargetsOutput, bool) bool, ...request.Option) error
|
||||
|
||||
DescribeHub(*securityhub.DescribeHubInput) (*securityhub.DescribeHubOutput, error)
|
||||
DescribeHubWithContext(aws.Context, *securityhub.DescribeHubInput, ...request.Option) (*securityhub.DescribeHubOutput, error)
|
||||
DescribeHubRequest(*securityhub.DescribeHubInput) (*request.Request, *securityhub.DescribeHubOutput)
|
||||
|
||||
DescribeProducts(*securityhub.DescribeProductsInput) (*securityhub.DescribeProductsOutput, error)
|
||||
DescribeProductsWithContext(aws.Context, *securityhub.DescribeProductsInput, ...request.Option) (*securityhub.DescribeProductsOutput, error)
|
||||
DescribeProductsRequest(*securityhub.DescribeProductsInput) (*request.Request, *securityhub.DescribeProductsOutput)
|
||||
|
||||
DescribeProductsPages(*securityhub.DescribeProductsInput, func(*securityhub.DescribeProductsOutput, bool) bool) error
|
||||
DescribeProductsPagesWithContext(aws.Context, *securityhub.DescribeProductsInput, func(*securityhub.DescribeProductsOutput, bool) bool, ...request.Option) error
|
||||
|
||||
DisableImportFindingsForProduct(*securityhub.DisableImportFindingsForProductInput) (*securityhub.DisableImportFindingsForProductOutput, error)
|
||||
DisableImportFindingsForProductWithContext(aws.Context, *securityhub.DisableImportFindingsForProductInput, ...request.Option) (*securityhub.DisableImportFindingsForProductOutput, error)
|
||||
DisableImportFindingsForProductRequest(*securityhub.DisableImportFindingsForProductInput) (*request.Request, *securityhub.DisableImportFindingsForProductOutput)
|
||||
|
||||
DisableSecurityHub(*securityhub.DisableSecurityHubInput) (*securityhub.DisableSecurityHubOutput, error)
|
||||
DisableSecurityHubWithContext(aws.Context, *securityhub.DisableSecurityHubInput, ...request.Option) (*securityhub.DisableSecurityHubOutput, error)
|
||||
DisableSecurityHubRequest(*securityhub.DisableSecurityHubInput) (*request.Request, *securityhub.DisableSecurityHubOutput)
|
||||
|
||||
DisassociateFromMasterAccount(*securityhub.DisassociateFromMasterAccountInput) (*securityhub.DisassociateFromMasterAccountOutput, error)
|
||||
DisassociateFromMasterAccountWithContext(aws.Context, *securityhub.DisassociateFromMasterAccountInput, ...request.Option) (*securityhub.DisassociateFromMasterAccountOutput, error)
|
||||
DisassociateFromMasterAccountRequest(*securityhub.DisassociateFromMasterAccountInput) (*request.Request, *securityhub.DisassociateFromMasterAccountOutput)
|
||||
|
||||
DisassociateMembers(*securityhub.DisassociateMembersInput) (*securityhub.DisassociateMembersOutput, error)
|
||||
DisassociateMembersWithContext(aws.Context, *securityhub.DisassociateMembersInput, ...request.Option) (*securityhub.DisassociateMembersOutput, error)
|
||||
DisassociateMembersRequest(*securityhub.DisassociateMembersInput) (*request.Request, *securityhub.DisassociateMembersOutput)
|
||||
|
||||
EnableImportFindingsForProduct(*securityhub.EnableImportFindingsForProductInput) (*securityhub.EnableImportFindingsForProductOutput, error)
|
||||
EnableImportFindingsForProductWithContext(aws.Context, *securityhub.EnableImportFindingsForProductInput, ...request.Option) (*securityhub.EnableImportFindingsForProductOutput, error)
|
||||
EnableImportFindingsForProductRequest(*securityhub.EnableImportFindingsForProductInput) (*request.Request, *securityhub.EnableImportFindingsForProductOutput)
|
||||
|
||||
EnableSecurityHub(*securityhub.EnableSecurityHubInput) (*securityhub.EnableSecurityHubOutput, error)
|
||||
EnableSecurityHubWithContext(aws.Context, *securityhub.EnableSecurityHubInput, ...request.Option) (*securityhub.EnableSecurityHubOutput, error)
|
||||
EnableSecurityHubRequest(*securityhub.EnableSecurityHubInput) (*request.Request, *securityhub.EnableSecurityHubOutput)
|
||||
|
||||
GetEnabledStandards(*securityhub.GetEnabledStandardsInput) (*securityhub.GetEnabledStandardsOutput, error)
|
||||
GetEnabledStandardsWithContext(aws.Context, *securityhub.GetEnabledStandardsInput, ...request.Option) (*securityhub.GetEnabledStandardsOutput, error)
|
||||
GetEnabledStandardsRequest(*securityhub.GetEnabledStandardsInput) (*request.Request, *securityhub.GetEnabledStandardsOutput)
|
||||
|
||||
GetFindings(*securityhub.GetFindingsInput) (*securityhub.GetFindingsOutput, error)
|
||||
GetFindingsWithContext(aws.Context, *securityhub.GetFindingsInput, ...request.Option) (*securityhub.GetFindingsOutput, error)
|
||||
GetFindingsRequest(*securityhub.GetFindingsInput) (*request.Request, *securityhub.GetFindingsOutput)
|
||||
|
||||
GetFindingsPages(*securityhub.GetFindingsInput, func(*securityhub.GetFindingsOutput, bool) bool) error
|
||||
GetFindingsPagesWithContext(aws.Context, *securityhub.GetFindingsInput, func(*securityhub.GetFindingsOutput, bool) bool, ...request.Option) error
|
||||
|
||||
GetInsightResults(*securityhub.GetInsightResultsInput) (*securityhub.GetInsightResultsOutput, error)
|
||||
GetInsightResultsWithContext(aws.Context, *securityhub.GetInsightResultsInput, ...request.Option) (*securityhub.GetInsightResultsOutput, error)
|
||||
GetInsightResultsRequest(*securityhub.GetInsightResultsInput) (*request.Request, *securityhub.GetInsightResultsOutput)
|
||||
|
||||
GetInsights(*securityhub.GetInsightsInput) (*securityhub.GetInsightsOutput, error)
|
||||
GetInsightsWithContext(aws.Context, *securityhub.GetInsightsInput, ...request.Option) (*securityhub.GetInsightsOutput, error)
|
||||
GetInsightsRequest(*securityhub.GetInsightsInput) (*request.Request, *securityhub.GetInsightsOutput)
|
||||
|
||||
GetInsightsPages(*securityhub.GetInsightsInput, func(*securityhub.GetInsightsOutput, bool) bool) error
|
||||
GetInsightsPagesWithContext(aws.Context, *securityhub.GetInsightsInput, func(*securityhub.GetInsightsOutput, bool) bool, ...request.Option) error
|
||||
|
||||
GetInvitationsCount(*securityhub.GetInvitationsCountInput) (*securityhub.GetInvitationsCountOutput, error)
|
||||
GetInvitationsCountWithContext(aws.Context, *securityhub.GetInvitationsCountInput, ...request.Option) (*securityhub.GetInvitationsCountOutput, error)
|
||||
GetInvitationsCountRequest(*securityhub.GetInvitationsCountInput) (*request.Request, *securityhub.GetInvitationsCountOutput)
|
||||
|
||||
GetMasterAccount(*securityhub.GetMasterAccountInput) (*securityhub.GetMasterAccountOutput, error)
|
||||
GetMasterAccountWithContext(aws.Context, *securityhub.GetMasterAccountInput, ...request.Option) (*securityhub.GetMasterAccountOutput, error)
|
||||
GetMasterAccountRequest(*securityhub.GetMasterAccountInput) (*request.Request, *securityhub.GetMasterAccountOutput)
|
||||
|
||||
GetMembers(*securityhub.GetMembersInput) (*securityhub.GetMembersOutput, error)
|
||||
GetMembersWithContext(aws.Context, *securityhub.GetMembersInput, ...request.Option) (*securityhub.GetMembersOutput, error)
|
||||
GetMembersRequest(*securityhub.GetMembersInput) (*request.Request, *securityhub.GetMembersOutput)
|
||||
|
||||
InviteMembers(*securityhub.InviteMembersInput) (*securityhub.InviteMembersOutput, error)
|
||||
InviteMembersWithContext(aws.Context, *securityhub.InviteMembersInput, ...request.Option) (*securityhub.InviteMembersOutput, error)
|
||||
InviteMembersRequest(*securityhub.InviteMembersInput) (*request.Request, *securityhub.InviteMembersOutput)
|
||||
|
||||
ListEnabledProductsForImport(*securityhub.ListEnabledProductsForImportInput) (*securityhub.ListEnabledProductsForImportOutput, error)
|
||||
ListEnabledProductsForImportWithContext(aws.Context, *securityhub.ListEnabledProductsForImportInput, ...request.Option) (*securityhub.ListEnabledProductsForImportOutput, error)
|
||||
ListEnabledProductsForImportRequest(*securityhub.ListEnabledProductsForImportInput) (*request.Request, *securityhub.ListEnabledProductsForImportOutput)
|
||||
|
||||
ListEnabledProductsForImportPages(*securityhub.ListEnabledProductsForImportInput, func(*securityhub.ListEnabledProductsForImportOutput, bool) bool) error
|
||||
ListEnabledProductsForImportPagesWithContext(aws.Context, *securityhub.ListEnabledProductsForImportInput, func(*securityhub.ListEnabledProductsForImportOutput, bool) bool, ...request.Option) error
|
||||
|
||||
ListInvitations(*securityhub.ListInvitationsInput) (*securityhub.ListInvitationsOutput, error)
|
||||
ListInvitationsWithContext(aws.Context, *securityhub.ListInvitationsInput, ...request.Option) (*securityhub.ListInvitationsOutput, error)
|
||||
ListInvitationsRequest(*securityhub.ListInvitationsInput) (*request.Request, *securityhub.ListInvitationsOutput)
|
||||
|
||||
ListMembers(*securityhub.ListMembersInput) (*securityhub.ListMembersOutput, error)
|
||||
ListMembersWithContext(aws.Context, *securityhub.ListMembersInput, ...request.Option) (*securityhub.ListMembersOutput, error)
|
||||
ListMembersRequest(*securityhub.ListMembersInput) (*request.Request, *securityhub.ListMembersOutput)
|
||||
|
||||
ListTagsForResource(*securityhub.ListTagsForResourceInput) (*securityhub.ListTagsForResourceOutput, error)
|
||||
ListTagsForResourceWithContext(aws.Context, *securityhub.ListTagsForResourceInput, ...request.Option) (*securityhub.ListTagsForResourceOutput, error)
|
||||
ListTagsForResourceRequest(*securityhub.ListTagsForResourceInput) (*request.Request, *securityhub.ListTagsForResourceOutput)
|
||||
|
||||
TagResource(*securityhub.TagResourceInput) (*securityhub.TagResourceOutput, error)
|
||||
TagResourceWithContext(aws.Context, *securityhub.TagResourceInput, ...request.Option) (*securityhub.TagResourceOutput, error)
|
||||
TagResourceRequest(*securityhub.TagResourceInput) (*request.Request, *securityhub.TagResourceOutput)
|
||||
|
||||
UntagResource(*securityhub.UntagResourceInput) (*securityhub.UntagResourceOutput, error)
|
||||
UntagResourceWithContext(aws.Context, *securityhub.UntagResourceInput, ...request.Option) (*securityhub.UntagResourceOutput, error)
|
||||
UntagResourceRequest(*securityhub.UntagResourceInput) (*request.Request, *securityhub.UntagResourceOutput)
|
||||
|
||||
UpdateActionTarget(*securityhub.UpdateActionTargetInput) (*securityhub.UpdateActionTargetOutput, error)
|
||||
UpdateActionTargetWithContext(aws.Context, *securityhub.UpdateActionTargetInput, ...request.Option) (*securityhub.UpdateActionTargetOutput, error)
|
||||
UpdateActionTargetRequest(*securityhub.UpdateActionTargetInput) (*request.Request, *securityhub.UpdateActionTargetOutput)
|
||||
|
||||
UpdateFindings(*securityhub.UpdateFindingsInput) (*securityhub.UpdateFindingsOutput, error)
|
||||
UpdateFindingsWithContext(aws.Context, *securityhub.UpdateFindingsInput, ...request.Option) (*securityhub.UpdateFindingsOutput, error)
|
||||
UpdateFindingsRequest(*securityhub.UpdateFindingsInput) (*request.Request, *securityhub.UpdateFindingsOutput)
|
||||
|
||||
UpdateInsight(*securityhub.UpdateInsightInput) (*securityhub.UpdateInsightOutput, error)
|
||||
UpdateInsightWithContext(aws.Context, *securityhub.UpdateInsightInput, ...request.Option) (*securityhub.UpdateInsightOutput, error)
|
||||
UpdateInsightRequest(*securityhub.UpdateInsightInput) (*request.Request, *securityhub.UpdateInsightOutput)
|
||||
}
|
||||
|
||||
var _ SecurityHubAPI = (*securityhub.SecurityHub)(nil)
|
||||
+98
@@ -0,0 +1,98 @@
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package securityhub
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/client"
|
||||
"github.com/aws/aws-sdk-go/aws/client/metadata"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go/private/protocol/restjson"
|
||||
)
|
||||
|
||||
// SecurityHub provides the API operation methods for making requests to
|
||||
// AWS SecurityHub. See this package's package overview docs
|
||||
// for details on the service.
|
||||
//
|
||||
// SecurityHub methods are safe to use concurrently. It is not safe to
|
||||
// modify mutate any of the struct's properties though.
|
||||
type SecurityHub struct {
|
||||
*client.Client
|
||||
}
|
||||
|
||||
// Used for custom client initialization logic
|
||||
var initClient func(*client.Client)
|
||||
|
||||
// Used for custom request initialization logic
|
||||
var initRequest func(*request.Request)
|
||||
|
||||
// Service information constants
|
||||
const (
|
||||
ServiceName = "SecurityHub" // Name of service.
|
||||
EndpointsID = "securityhub" // ID to lookup a service endpoint with.
|
||||
ServiceID = "SecurityHub" // ServiceID is a unique identifer of a specific service.
|
||||
)
|
||||
|
||||
// New creates a new instance of the SecurityHub client with a session.
|
||||
// If additional configuration is needed for the client instance use the optional
|
||||
// aws.Config parameter to add your extra config.
|
||||
//
|
||||
// Example:
|
||||
// // Create a SecurityHub client from just a session.
|
||||
// svc := securityhub.New(mySession)
|
||||
//
|
||||
// // Create a SecurityHub client with additional configuration
|
||||
// svc := securityhub.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
|
||||
func New(p client.ConfigProvider, cfgs ...*aws.Config) *SecurityHub {
|
||||
c := p.ClientConfig(EndpointsID, cfgs...)
|
||||
if c.SigningNameDerived || len(c.SigningName) == 0 {
|
||||
c.SigningName = "securityhub"
|
||||
}
|
||||
return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName)
|
||||
}
|
||||
|
||||
// newClient creates, initializes and returns a new service client instance.
|
||||
func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *SecurityHub {
|
||||
svc := &SecurityHub{
|
||||
Client: client.New(
|
||||
cfg,
|
||||
metadata.ClientInfo{
|
||||
ServiceName: ServiceName,
|
||||
ServiceID: ServiceID,
|
||||
SigningName: signingName,
|
||||
SigningRegion: signingRegion,
|
||||
Endpoint: endpoint,
|
||||
APIVersion: "2018-10-26",
|
||||
},
|
||||
handlers,
|
||||
),
|
||||
}
|
||||
|
||||
// Handlers
|
||||
svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
|
||||
svc.Handlers.Build.PushBackNamed(restjson.BuildHandler)
|
||||
svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler)
|
||||
svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler)
|
||||
svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler)
|
||||
|
||||
// Run custom client initialization if present
|
||||
if initClient != nil {
|
||||
initClient(svc.Client)
|
||||
}
|
||||
|
||||
return svc
|
||||
}
|
||||
|
||||
// newRequest creates a new request for a SecurityHub operation and runs any
|
||||
// custom request initialization.
|
||||
func (c *SecurityHub) newRequest(op *request.Operation, params, data interface{}) *request.Request {
|
||||
req := c.NewRequest(op, params, data)
|
||||
|
||||
// Run custom request initialization if present
|
||||
if initRequest != nil {
|
||||
initRequest(req)
|
||||
}
|
||||
|
||||
return req
|
||||
}
|
||||
Reference in New Issue
Block a user