本文整理汇总了Golang中github.com/upstartmobile/aws-sdk-go/service/apigateway.New函数的典型用法代码示例。如果您正苦于以下问题:Golang New函数的具体用法?Golang New怎么用?Golang New使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了New函数的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。
示例1: ExampleAPIGateway_UpdateStage
func ExampleAPIGateway_UpdateStage() {
svc := apigateway.New(nil)
params := &apigateway.UpdateStageInput{
RestApiId: aws.String("String"), // Required
StageName: aws.String("String"), // Required
PatchOperations: []*apigateway.PatchOperation{
{ // Required
From: aws.String("String"),
Op: aws.String("op"),
Path: aws.String("String"),
Value: aws.String("String"),
},
// More values...
},
}
resp, err := svc.UpdateStage(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)
}
开发者ID:nehadhamija,项目名称:aws-sdk-go,代码行数:28,代码来源:examples_test.go
示例2: ExampleAPIGateway_CreateApiKey
func ExampleAPIGateway_CreateApiKey() {
svc := apigateway.New(nil)
params := &apigateway.CreateApiKeyInput{
Description: aws.String("String"),
Enabled: aws.Bool(true),
Name: aws.String("String"),
StageKeys: []*apigateway.StageKey{
{ // Required
RestApiId: aws.String("String"),
StageName: aws.String("String"),
},
// More values...
},
}
resp, err := svc.CreateApiKey(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)
}
开发者ID:nehadhamija,项目名称:aws-sdk-go,代码行数:27,代码来源:examples_test.go
示例3: ExampleAPIGateway_TestInvokeMethod
func ExampleAPIGateway_TestInvokeMethod() {
svc := apigateway.New(nil)
params := &apigateway.TestInvokeMethodInput{
HttpMethod: aws.String("String"), // Required
ResourceId: aws.String("String"), // Required
RestApiId: aws.String("String"), // Required
Body: aws.String("String"),
ClientCertificateId: aws.String("String"),
Headers: map[string]*string{
"Key": aws.String("String"), // Required
// More values...
},
PathWithQueryString: aws.String("String"),
}
resp, err := svc.TestInvokeMethod(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)
}
开发者ID:nehadhamija,项目名称:aws-sdk-go,代码行数:27,代码来源:examples_test.go
示例4: ExampleAPIGateway_PutMethodResponse
func ExampleAPIGateway_PutMethodResponse() {
svc := apigateway.New(nil)
params := &apigateway.PutMethodResponseInput{
HttpMethod: aws.String("String"), // Required
ResourceId: aws.String("String"), // Required
RestApiId: aws.String("String"), // Required
StatusCode: aws.String("StatusCode"), // Required
ResponseModels: map[string]*string{
"Key": aws.String("String"), // Required
// More values...
},
ResponseParameters: map[string]*bool{
"Key": aws.Bool(true), // Required
// More values...
},
}
resp, err := svc.PutMethodResponse(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)
}
开发者ID:nehadhamija,项目名称:aws-sdk-go,代码行数:29,代码来源:examples_test.go
示例5: ExampleAPIGateway_GetAccount
func ExampleAPIGateway_GetAccount() {
svc := apigateway.New(nil)
var params *apigateway.GetAccountInput
resp, err := svc.GetAccount(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)
}
开发者ID:nehadhamija,项目名称:aws-sdk-go,代码行数:16,代码来源:examples_test.go
示例6: ExampleAPIGateway_GetRestApi
func ExampleAPIGateway_GetRestApi() {
svc := apigateway.New(nil)
params := &apigateway.GetRestApiInput{
RestApiId: aws.String("String"), // Required
}
resp, err := svc.GetRestApi(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)
}
开发者ID:nehadhamija,项目名称:aws-sdk-go,代码行数:18,代码来源:examples_test.go
示例7: ExampleAPIGateway_GenerateClientCertificate
func ExampleAPIGateway_GenerateClientCertificate() {
svc := apigateway.New(nil)
params := &apigateway.GenerateClientCertificateInput{
Description: aws.String("String"),
}
resp, err := svc.GenerateClientCertificate(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)
}
开发者ID:nehadhamija,项目名称:aws-sdk-go,代码行数:18,代码来源:examples_test.go
示例8: ExampleAPIGateway_GetRestApis
func ExampleAPIGateway_GetRestApis() {
svc := apigateway.New(nil)
params := &apigateway.GetRestApisInput{
Limit: aws.Int64(1),
Position: aws.String("String"),
}
resp, err := svc.GetRestApis(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)
}
开发者ID:nehadhamija,项目名称:aws-sdk-go,代码行数:19,代码来源:examples_test.go
示例9: ExampleAPIGateway_DeleteBasePathMapping
func ExampleAPIGateway_DeleteBasePathMapping() {
svc := apigateway.New(nil)
params := &apigateway.DeleteBasePathMappingInput{
BasePath: aws.String("String"), // Required
DomainName: aws.String("String"), // Required
}
resp, err := svc.DeleteBasePathMapping(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)
}
开发者ID:nehadhamija,项目名称:aws-sdk-go,代码行数:19,代码来源:examples_test.go
示例10: ExampleAPIGateway_CreateRestApi
func ExampleAPIGateway_CreateRestApi() {
svc := apigateway.New(nil)
params := &apigateway.CreateRestApiInput{
Name: aws.String("String"), // Required
CloneFrom: aws.String("String"),
Description: aws.String("String"),
}
resp, err := svc.CreateRestApi(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)
}
开发者ID:nehadhamija,项目名称:aws-sdk-go,代码行数:20,代码来源:examples_test.go
示例11: ExampleAPIGateway_DeleteIntegration
func ExampleAPIGateway_DeleteIntegration() {
svc := apigateway.New(nil)
params := &apigateway.DeleteIntegrationInput{
HttpMethod: aws.String("String"), // Required
ResourceId: aws.String("String"), // Required
RestApiId: aws.String("String"), // Required
}
resp, err := svc.DeleteIntegration(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)
}
开发者ID:nehadhamija,项目名称:aws-sdk-go,代码行数:20,代码来源:examples_test.go
示例12: ExampleAPIGateway_CreateDomainName
func ExampleAPIGateway_CreateDomainName() {
svc := apigateway.New(nil)
params := &apigateway.CreateDomainNameInput{
CertificateBody: aws.String("String"), // Required
CertificateChain: aws.String("String"), // Required
CertificateName: aws.String("String"), // Required
CertificatePrivateKey: aws.String("String"), // Required
DomainName: aws.String("String"), // Required
}
resp, err := svc.CreateDomainName(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)
}
开发者ID:nehadhamija,项目名称:aws-sdk-go,代码行数:22,代码来源:examples_test.go
示例13: ExampleAPIGateway_CreateDeployment
func ExampleAPIGateway_CreateDeployment() {
svc := apigateway.New(nil)
params := &apigateway.CreateDeploymentInput{
RestApiId: aws.String("String"), // Required
StageName: aws.String("String"), // Required
CacheClusterEnabled: aws.Bool(true),
CacheClusterSize: aws.String("CacheClusterSize"),
Description: aws.String("String"),
StageDescription: aws.String("String"),
}
resp, err := svc.CreateDeployment(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)
}
开发者ID:nehadhamija,项目名称:aws-sdk-go,代码行数:23,代码来源:examples_test.go
示例14: ExampleAPIGateway_PutIntegration
func ExampleAPIGateway_PutIntegration() {
svc := apigateway.New(nil)
params := &apigateway.PutIntegrationInput{
HttpMethod: aws.String("String"), // Required
ResourceId: aws.String("String"), // Required
RestApiId: aws.String("String"), // Required
Type: aws.String("IntegrationType"), // Required
CacheKeyParameters: []*string{
aws.String("String"), // Required
// More values...
},
CacheNamespace: aws.String("String"),
Credentials: aws.String("String"),
RequestParameters: map[string]*string{
"Key": aws.String("String"), // Required
// More values...
},
RequestTemplates: map[string]*string{
"Key": aws.String("String"), // Required
// More values...
},
Uri: aws.String("String"),
}
resp, err := svc.PutIntegration(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)
}
开发者ID:nehadhamija,项目名称:aws-sdk-go,代码行数:36,代码来源:examples_test.go
示例15: ExampleAPIGateway_GetSdk
func ExampleAPIGateway_GetSdk() {
svc := apigateway.New(nil)
params := &apigateway.GetSdkInput{
RestApiId: aws.String("String"), // Required
SdkType: aws.String("String"), // Required
StageName: aws.String("String"), // Required
Parameters: map[string]*string{
"Key": aws.String("String"), // Required
// More values...
},
}
resp, err := svc.GetSdk(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)
}
开发者ID:nehadhamija,项目名称:aws-sdk-go,代码行数:24,代码来源:examples_test.go
示例16: TestInterface
func TestInterface(t *testing.T) {
assert.Implements(t, (*apigatewayiface.APIGatewayAPI)(nil), apigateway.New(nil))
}
开发者ID:nehadhamija,项目名称:aws-sdk-go,代码行数:3,代码来源:interface_test.go
示例17: init
func init() {
Before("@apigateway", func() {
World["client"] = apigateway.New(nil)
})
}
开发者ID:nehadhamija,项目名称:aws-sdk-go,代码行数:5,代码来源:client.go
注:本文中的github.com/upstartmobile/aws-sdk-go/service/apigateway.New函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论