mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
glide update
This commit is contained in:
1430
vendor/github.com/aws/aws-sdk-go/service/applicationdiscoveryservice/api.go
generated
vendored
Normal file
1430
vendor/github.com/aws/aws-sdk-go/service/applicationdiscoveryservice/api.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
54
vendor/github.com/aws/aws-sdk-go/service/applicationdiscoveryservice/applicationdiscoveryserviceiface/interface.go
generated
vendored
Normal file
54
vendor/github.com/aws/aws-sdk-go/service/applicationdiscoveryservice/applicationdiscoveryserviceiface/interface.go
generated
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
|
||||
// Package applicationdiscoveryserviceiface provides an interface for the AWS Application Discovery Service.
|
||||
package applicationdiscoveryserviceiface
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/service/applicationdiscoveryservice"
|
||||
)
|
||||
|
||||
// ApplicationDiscoveryServiceAPI is the interface type for applicationdiscoveryservice.ApplicationDiscoveryService.
|
||||
type ApplicationDiscoveryServiceAPI interface {
|
||||
CreateTagsRequest(*applicationdiscoveryservice.CreateTagsInput) (*request.Request, *applicationdiscoveryservice.CreateTagsOutput)
|
||||
|
||||
CreateTags(*applicationdiscoveryservice.CreateTagsInput) (*applicationdiscoveryservice.CreateTagsOutput, error)
|
||||
|
||||
DeleteTagsRequest(*applicationdiscoveryservice.DeleteTagsInput) (*request.Request, *applicationdiscoveryservice.DeleteTagsOutput)
|
||||
|
||||
DeleteTags(*applicationdiscoveryservice.DeleteTagsInput) (*applicationdiscoveryservice.DeleteTagsOutput, error)
|
||||
|
||||
DescribeAgentsRequest(*applicationdiscoveryservice.DescribeAgentsInput) (*request.Request, *applicationdiscoveryservice.DescribeAgentsOutput)
|
||||
|
||||
DescribeAgents(*applicationdiscoveryservice.DescribeAgentsInput) (*applicationdiscoveryservice.DescribeAgentsOutput, error)
|
||||
|
||||
DescribeConfigurationsRequest(*applicationdiscoveryservice.DescribeConfigurationsInput) (*request.Request, *applicationdiscoveryservice.DescribeConfigurationsOutput)
|
||||
|
||||
DescribeConfigurations(*applicationdiscoveryservice.DescribeConfigurationsInput) (*applicationdiscoveryservice.DescribeConfigurationsOutput, error)
|
||||
|
||||
DescribeExportConfigurationsRequest(*applicationdiscoveryservice.DescribeExportConfigurationsInput) (*request.Request, *applicationdiscoveryservice.DescribeExportConfigurationsOutput)
|
||||
|
||||
DescribeExportConfigurations(*applicationdiscoveryservice.DescribeExportConfigurationsInput) (*applicationdiscoveryservice.DescribeExportConfigurationsOutput, error)
|
||||
|
||||
DescribeTagsRequest(*applicationdiscoveryservice.DescribeTagsInput) (*request.Request, *applicationdiscoveryservice.DescribeTagsOutput)
|
||||
|
||||
DescribeTags(*applicationdiscoveryservice.DescribeTagsInput) (*applicationdiscoveryservice.DescribeTagsOutput, error)
|
||||
|
||||
ExportConfigurationsRequest(*applicationdiscoveryservice.ExportConfigurationsInput) (*request.Request, *applicationdiscoveryservice.ExportConfigurationsOutput)
|
||||
|
||||
ExportConfigurations(*applicationdiscoveryservice.ExportConfigurationsInput) (*applicationdiscoveryservice.ExportConfigurationsOutput, error)
|
||||
|
||||
ListConfigurationsRequest(*applicationdiscoveryservice.ListConfigurationsInput) (*request.Request, *applicationdiscoveryservice.ListConfigurationsOutput)
|
||||
|
||||
ListConfigurations(*applicationdiscoveryservice.ListConfigurationsInput) (*applicationdiscoveryservice.ListConfigurationsOutput, error)
|
||||
|
||||
StartDataCollectionByAgentIdsRequest(*applicationdiscoveryservice.StartDataCollectionByAgentIdsInput) (*request.Request, *applicationdiscoveryservice.StartDataCollectionByAgentIdsOutput)
|
||||
|
||||
StartDataCollectionByAgentIds(*applicationdiscoveryservice.StartDataCollectionByAgentIdsInput) (*applicationdiscoveryservice.StartDataCollectionByAgentIdsOutput, error)
|
||||
|
||||
StopDataCollectionByAgentIdsRequest(*applicationdiscoveryservice.StopDataCollectionByAgentIdsInput) (*request.Request, *applicationdiscoveryservice.StopDataCollectionByAgentIdsOutput)
|
||||
|
||||
StopDataCollectionByAgentIds(*applicationdiscoveryservice.StopDataCollectionByAgentIdsInput) (*applicationdiscoveryservice.StopDataCollectionByAgentIdsOutput, error)
|
||||
}
|
||||
|
||||
var _ ApplicationDiscoveryServiceAPI = (*applicationdiscoveryservice.ApplicationDiscoveryService)(nil)
|
||||
267
vendor/github.com/aws/aws-sdk-go/service/applicationdiscoveryservice/examples_test.go
generated
vendored
Normal file
267
vendor/github.com/aws/aws-sdk-go/service/applicationdiscoveryservice/examples_test.go
generated
vendored
Normal file
@@ -0,0 +1,267 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
|
||||
package applicationdiscoveryservice_test
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/session"
|
||||
"github.com/aws/aws-sdk-go/service/applicationdiscoveryservice"
|
||||
)
|
||||
|
||||
var _ time.Duration
|
||||
var _ bytes.Buffer
|
||||
|
||||
func ExampleApplicationDiscoveryService_CreateTags() {
|
||||
svc := applicationdiscoveryservice.New(session.New())
|
||||
|
||||
params := &applicationdiscoveryservice.CreateTagsInput{
|
||||
ConfigurationIds: []*string{ // Required
|
||||
aws.String("ConfigurationId"), // Required
|
||||
// More values...
|
||||
},
|
||||
Tags: []*applicationdiscoveryservice.Tag{ // Required
|
||||
{ // Required
|
||||
Key: aws.String("TagKey"), // Required
|
||||
Value: aws.String("TagValue"), // Required
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.CreateTags(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleApplicationDiscoveryService_DeleteTags() {
|
||||
svc := applicationdiscoveryservice.New(session.New())
|
||||
|
||||
params := &applicationdiscoveryservice.DeleteTagsInput{
|
||||
ConfigurationIds: []*string{ // Required
|
||||
aws.String("ConfigurationId"), // Required
|
||||
// More values...
|
||||
},
|
||||
Tags: []*applicationdiscoveryservice.Tag{
|
||||
{ // Required
|
||||
Key: aws.String("TagKey"), // Required
|
||||
Value: aws.String("TagValue"), // Required
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.DeleteTags(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleApplicationDiscoveryService_DescribeAgents() {
|
||||
svc := applicationdiscoveryservice.New(session.New())
|
||||
|
||||
params := &applicationdiscoveryservice.DescribeAgentsInput{
|
||||
AgentIds: []*string{
|
||||
aws.String("AgentId"), // Required
|
||||
// More values...
|
||||
},
|
||||
MaxResults: aws.Int64(1),
|
||||
NextToken: aws.String("NextToken"),
|
||||
}
|
||||
resp, err := svc.DescribeAgents(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleApplicationDiscoveryService_DescribeConfigurations() {
|
||||
svc := applicationdiscoveryservice.New(session.New())
|
||||
|
||||
params := &applicationdiscoveryservice.DescribeConfigurationsInput{
|
||||
ConfigurationIds: []*string{ // Required
|
||||
aws.String("ConfigurationId"), // Required
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.DescribeConfigurations(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleApplicationDiscoveryService_DescribeExportConfigurations() {
|
||||
svc := applicationdiscoveryservice.New(session.New())
|
||||
|
||||
params := &applicationdiscoveryservice.DescribeExportConfigurationsInput{
|
||||
ExportIds: []*string{
|
||||
aws.String("ConfigurationsExportId"), // Required
|
||||
// More values...
|
||||
},
|
||||
MaxResults: aws.Int64(1),
|
||||
NextToken: aws.String("NextToken"),
|
||||
}
|
||||
resp, err := svc.DescribeExportConfigurations(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleApplicationDiscoveryService_DescribeTags() {
|
||||
svc := applicationdiscoveryservice.New(session.New())
|
||||
|
||||
params := &applicationdiscoveryservice.DescribeTagsInput{
|
||||
Filters: []*applicationdiscoveryservice.TagFilter{
|
||||
{ // Required
|
||||
Name: aws.String("FilterName"), // Required
|
||||
Values: []*string{ // Required
|
||||
aws.String("FilterValue"), // Required
|
||||
// More values...
|
||||
},
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
MaxResults: aws.Int64(1),
|
||||
NextToken: aws.String("NextToken"),
|
||||
}
|
||||
resp, err := svc.DescribeTags(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleApplicationDiscoveryService_ExportConfigurations() {
|
||||
svc := applicationdiscoveryservice.New(session.New())
|
||||
|
||||
var params *applicationdiscoveryservice.ExportConfigurationsInput
|
||||
resp, err := svc.ExportConfigurations(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleApplicationDiscoveryService_ListConfigurations() {
|
||||
svc := applicationdiscoveryservice.New(session.New())
|
||||
|
||||
params := &applicationdiscoveryservice.ListConfigurationsInput{
|
||||
ConfigurationType: aws.String("ConfigurationItemType"), // Required
|
||||
Filters: []*applicationdiscoveryservice.Filter{
|
||||
{ // Required
|
||||
Condition: aws.String("Condition"), // Required
|
||||
Name: aws.String("String"), // Required
|
||||
Values: []*string{ // Required
|
||||
aws.String("FilterValue"), // Required
|
||||
// More values...
|
||||
},
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
MaxResults: aws.Int64(1),
|
||||
NextToken: aws.String("NextToken"),
|
||||
}
|
||||
resp, err := svc.ListConfigurations(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleApplicationDiscoveryService_StartDataCollectionByAgentIds() {
|
||||
svc := applicationdiscoveryservice.New(session.New())
|
||||
|
||||
params := &applicationdiscoveryservice.StartDataCollectionByAgentIdsInput{
|
||||
AgentIds: []*string{ // Required
|
||||
aws.String("AgentId"), // Required
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.StartDataCollectionByAgentIds(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleApplicationDiscoveryService_StopDataCollectionByAgentIds() {
|
||||
svc := applicationdiscoveryservice.New(session.New())
|
||||
|
||||
params := &applicationdiscoveryservice.StopDataCollectionByAgentIdsInput{
|
||||
AgentIds: []*string{ // Required
|
||||
aws.String("AgentId"), // Required
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.StopDataCollectionByAgentIds(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
282
vendor/github.com/aws/aws-sdk-go/service/applicationdiscoveryservice/service.go
generated
vendored
Normal file
282
vendor/github.com/aws/aws-sdk-go/service/applicationdiscoveryservice/service.go
generated
vendored
Normal file
@@ -0,0 +1,282 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
|
||||
package applicationdiscoveryservice
|
||||
|
||||
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/jsonrpc"
|
||||
)
|
||||
|
||||
// The AWS Application Discovery Service helps Systems Integrators quickly and
|
||||
// reliably plan application migration projects by automatically identifying
|
||||
// applications running in on-premises data centers, their associated dependencies,
|
||||
// and their performance profile.
|
||||
//
|
||||
// Planning data center migrations can involve thousands of workloads that
|
||||
// are often deeply interdependent. Application discovery and dependency mapping
|
||||
// are important early first steps in the migration process, but difficult to
|
||||
// perform at scale due to the lack of automated tools.
|
||||
//
|
||||
// The AWS Application Discovery Service automatically collects configuration
|
||||
// and usage data from servers to develop a list of applications, how they perform,
|
||||
// and how they are interdependent. This information is securely retained in
|
||||
// an AWS Application Discovery Service database which you can export as a CSV
|
||||
// file into your preferred visualization tool or cloud migration solution to
|
||||
// help reduce the complexity and time in planning your cloud migration.
|
||||
//
|
||||
// The Application Discovery Service is currently available for preview. Only
|
||||
// customers who are engaged with AWS Professional Services (https://aws.amazon.com/professional-services/)
|
||||
// or a certified AWS partner can use the service. To see the list of certified
|
||||
// partners and request access to the Application Discovery Service, complete
|
||||
// the following preview form (http://aws.amazon.com/application-discovery/preview/).
|
||||
//
|
||||
// This API reference provides descriptions, syntax, and usage examples for
|
||||
// each of the actions and data types for the Discovery Service. The topic for
|
||||
// each action shows the API request parameters and the response. Alternatively,
|
||||
// you can use one of the AWS SDKs to access an API that is tailored to the
|
||||
// programming language or platform that you're using. For more information,
|
||||
// see AWS SDKs (http://aws.amazon.com/tools/#SDKs).
|
||||
//
|
||||
// This guide is intended for use with the AWS Discovery Service User Guide
|
||||
// (http://docs.aws.amazon.com/application-discovery/latest/userguide/what-is-appdiscovery.html).
|
||||
//
|
||||
// The following are short descriptions of each API action, organized by function.
|
||||
//
|
||||
// Managing AWS Agents Using the Application Discovery Service
|
||||
//
|
||||
// An AWS agent is software that you install on on-premises servers and virtual
|
||||
// machines that are targeted for discovery and migration. Agents run on Linux
|
||||
// and Windows Server and collect server configuration and activity information
|
||||
// about your applications and infrastructure. Specifically, agents collect
|
||||
// the following information and send it to the Application Discovery Service
|
||||
// using Secure Sockets Layer (SSL) encryption:
|
||||
//
|
||||
// User information (user name, home directory)
|
||||
//
|
||||
// Group information (name)
|
||||
//
|
||||
// List of installed packages
|
||||
//
|
||||
// List of kernel modules
|
||||
//
|
||||
// All create and stop process events
|
||||
//
|
||||
// DNS queries
|
||||
//
|
||||
// NIC information
|
||||
//
|
||||
// TCP/UDP process listening ports
|
||||
//
|
||||
// TCPV4/V6 connections
|
||||
//
|
||||
// Operating system information
|
||||
//
|
||||
// System performance
|
||||
//
|
||||
// Process performance
|
||||
//
|
||||
// The Application Discovery Service API includes the following actions to
|
||||
// manage AWS agents:
|
||||
//
|
||||
// StartDataCollectionByAgentIds: Instructs the specified agents to start
|
||||
// collecting data. The Application Discovery Service takes several minutes
|
||||
// to receive and process data after you initiate data collection.
|
||||
//
|
||||
// StopDataCollectionByAgentIds: Instructs the specified agents to stop
|
||||
// collecting data.
|
||||
//
|
||||
// DescribeAgents: Lists AWS agents by ID or lists all agents associated
|
||||
// with your user account if you did not specify an agent ID. The output includes
|
||||
// agent IDs, IP addresses, media access control (MAC) addresses, agent health,
|
||||
// host name where the agent resides, and the version number of each agent.
|
||||
//
|
||||
// Querying Configuration Items
|
||||
//
|
||||
// A configuration item is an IT asset that was discovered in your data center
|
||||
// by an AWS agent. When you use the Application Discovery Service, you can
|
||||
// specify filters and query specific configuration items. The service supports
|
||||
// Server, Process, and Connection configuration items. This means you can specify
|
||||
// a value for the following keys and query your IT assets:
|
||||
//
|
||||
// Server server.HostName
|
||||
//
|
||||
// server.osName
|
||||
//
|
||||
// server.osVersion
|
||||
//
|
||||
// server.configurationId
|
||||
//
|
||||
// server.agentId
|
||||
//
|
||||
// Process process.name
|
||||
//
|
||||
// process.CommandLine
|
||||
//
|
||||
// process.configurationId
|
||||
//
|
||||
// server.hostName
|
||||
//
|
||||
// server.osName
|
||||
//
|
||||
// server.osVersion
|
||||
//
|
||||
// server.configurationId
|
||||
//
|
||||
// server.agentId
|
||||
//
|
||||
// Connection connection.sourceIp
|
||||
//
|
||||
// connection.sourcePort
|
||||
//
|
||||
// connection.destinationIp
|
||||
//
|
||||
// connection.destinationPort
|
||||
//
|
||||
// sourceProcess.configurationId
|
||||
//
|
||||
// sourceProcess.commandLine
|
||||
//
|
||||
// sourceProcess.name
|
||||
//
|
||||
// destinationProcessId.configurationId
|
||||
//
|
||||
// destinationProcess.commandLine
|
||||
//
|
||||
// destinationProcess.name
|
||||
//
|
||||
// sourceServer.configurationId
|
||||
//
|
||||
// sourceServer.hostName
|
||||
//
|
||||
// sourceServer.osName
|
||||
//
|
||||
// sourceServer.osVersion
|
||||
//
|
||||
// destinationServer.configurationId
|
||||
//
|
||||
// destinationServer.hostName
|
||||
//
|
||||
// destinationServer.osName
|
||||
//
|
||||
// destinationServer.osVersion
|
||||
//
|
||||
// The Application Discovery Service includes the following actions for querying
|
||||
// configuration items.
|
||||
//
|
||||
// DescribeConfigurations: Retrieves a list of attributes for a specific
|
||||
// configuration ID. For example, the output for a server configuration item
|
||||
// includes a list of attributes about the server, including host name, operating
|
||||
// system, number of network cards, etc.
|
||||
//
|
||||
// ListConfigurations: Retrieves a list of configuration items according
|
||||
// to the criteria you specify in a filter. The filter criteria identify relationship
|
||||
// requirements. For example, you can specify filter criteria of process.name
|
||||
// with values of nginx and apache.
|
||||
//
|
||||
// Tagging Discovered Configuration Items
|
||||
//
|
||||
// You can tag discovered configuration items. Tags are metadata that help
|
||||
// you categorize IT assets in your data center. Tags use a key-value format.
|
||||
// For example, {"key": "serverType", "value": "webServer"}.
|
||||
//
|
||||
// CreateTags: Creates one or more tags for a configuration items.
|
||||
//
|
||||
// DescribeTags: Retrieves a list of configuration items that are tagged
|
||||
// with a specific tag. Or, retrieves a list of all tags assigned to a specific
|
||||
// configuration item.
|
||||
//
|
||||
// DeleteTags: Deletes the association between a configuration item and
|
||||
// one or more tags.
|
||||
//
|
||||
// Exporting Data
|
||||
//
|
||||
// You can export data as a CSV file to an Amazon S3 bucket or into your preferred
|
||||
// visualization tool or cloud migration solution to help reduce the complexity
|
||||
// and time in planning your cloud migration.
|
||||
//
|
||||
// ExportConfigurations: Exports all discovered configuration data to an
|
||||
// Amazon S3 bucket. Data includes tags and tag associations, processes, connections,
|
||||
// servers, and system performance. This API returns an export ID which you
|
||||
// can query using the GetExportStatus API.
|
||||
//
|
||||
// DescribeExportConfigurations: Gets the status of the data export. When
|
||||
// the export is complete, the service returns an Amazon S3 URL where you can
|
||||
// download CSV files that include the data.
|
||||
//The service client's operations are safe to be used concurrently.
|
||||
// It is not safe to mutate any of the client's properties though.
|
||||
type ApplicationDiscoveryService 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)
|
||||
|
||||
// A ServiceName is the name of the service the client will make API calls to.
|
||||
const ServiceName = "discovery"
|
||||
|
||||
// New creates a new instance of the ApplicationDiscoveryService 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 ApplicationDiscoveryService client from just a session.
|
||||
// svc := applicationdiscoveryservice.New(mySession)
|
||||
//
|
||||
// // Create a ApplicationDiscoveryService client with additional configuration
|
||||
// svc := applicationdiscoveryservice.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
|
||||
func New(p client.ConfigProvider, cfgs ...*aws.Config) *ApplicationDiscoveryService {
|
||||
c := p.ClientConfig(ServiceName, cfgs...)
|
||||
return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
|
||||
}
|
||||
|
||||
// newClient creates, initializes and returns a new service client instance.
|
||||
func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *ApplicationDiscoveryService {
|
||||
svc := &ApplicationDiscoveryService{
|
||||
Client: client.New(
|
||||
cfg,
|
||||
metadata.ClientInfo{
|
||||
ServiceName: ServiceName,
|
||||
SigningRegion: signingRegion,
|
||||
Endpoint: endpoint,
|
||||
APIVersion: "2015-11-01",
|
||||
JSONVersion: "1.1",
|
||||
TargetPrefix: "AWSPoseidonService_V2015_11_01",
|
||||
},
|
||||
handlers,
|
||||
),
|
||||
}
|
||||
|
||||
// Handlers
|
||||
svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
|
||||
svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler)
|
||||
svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler)
|
||||
svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler)
|
||||
svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler)
|
||||
|
||||
// Run custom client initialization if present
|
||||
if initClient != nil {
|
||||
initClient(svc.Client)
|
||||
}
|
||||
|
||||
return svc
|
||||
}
|
||||
|
||||
// newRequest creates a new request for a ApplicationDiscoveryService operation and runs any
|
||||
// custom request initialization.
|
||||
func (c *ApplicationDiscoveryService) 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