本文整理汇总了Golang中github.com/upstartmobile/aws-sdk-go/service/inspector.New函数的典型用法代码示例。如果您正苦于以下问题:Golang New函数的具体用法?Golang New怎么用?Golang New使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了New函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。
示例1: ExampleInspector_SetTagsForResource
func ExampleInspector_SetTagsForResource() {
svc := inspector.New(nil)
params := &inspector.SetTagsForResourceInput{
ResourceArn: aws.String("Arn"),
Tags: []*inspector.Tag{
{ // Required
Key: aws.String("TagKey"),
Value: aws.String("TagValue"),
},
// More values...
},
}
resp, err := svc.SetTagsForResource(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,代码行数:25,代码来源:examples_test.go
示例2: ExampleInspector_LocalizeText
func ExampleInspector_LocalizeText() {
svc := inspector.New(nil)
params := &inspector.LocalizeTextInput{
Locale: aws.String("Locale"),
LocalizedTexts: []*inspector.LocalizedText{
{ // Required
Key: &inspector.LocalizedTextKey{
Facility: aws.String("LocalizedFacility"),
Id: aws.String("LocalizedTextId"),
},
Parameters: []*inspector.Parameter{
{ // Required
Name: aws.String("ParameterName"),
Value: aws.String("ParameterValue"),
},
// More values...
},
},
// More values...
},
}
resp, err := svc.LocalizeText(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,代码行数:34,代码来源:examples_test.go
示例3: ExampleInspector_RemoveAttributesFromFindings
func ExampleInspector_RemoveAttributesFromFindings() {
svc := inspector.New(nil)
params := &inspector.RemoveAttributesFromFindingsInput{
AttributeKeys: []*string{
aws.String("AttributeKey"), // Required
// More values...
},
FindingArns: []*string{
aws.String("Arn"), // Required
// More values...
},
}
resp, err := svc.RemoveAttributesFromFindings(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,代码行数:25,代码来源:examples_test.go
示例4: ExampleInspector_CreateAssessment
func ExampleInspector_CreateAssessment() {
svc := inspector.New(nil)
params := &inspector.CreateAssessmentInput{
ApplicationArn: aws.String("Arn"),
AssessmentName: aws.String("Name"),
DurationInSeconds: aws.Int64(1),
UserAttributesForFindings: []*inspector.Attribute{
{ // Required
Key: aws.String("AttributeKey"),
Value: aws.String("AttributeValue"),
},
// More values...
},
}
resp, err := svc.CreateAssessment(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
示例5: ExampleInspector_ListAssessmentAgents
func ExampleInspector_ListAssessmentAgents() {
svc := inspector.New(nil)
params := &inspector.ListAssessmentAgentsInput{
AssessmentArn: aws.String("Arn"),
Filter: &inspector.AgentsFilter{
AgentHealthList: []*string{
aws.String("AgentHealth"), // Required
// More values...
},
},
MaxResults: aws.Int64(1),
NextToken: aws.String("PaginationToken"),
}
resp, err := svc.ListAssessmentAgents(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,代码行数:26,代码来源:examples_test.go
示例6: ExampleInspector_ListFindings
func ExampleInspector_ListFindings() {
svc := inspector.New(nil)
params := &inspector.ListFindingsInput{
Filter: &inspector.FindingsFilter{
Attributes: []*inspector.Attribute{
{ // Required
Key: aws.String("AttributeKey"),
Value: aws.String("AttributeValue"),
},
// More values...
},
RuleNames: []*string{
aws.String("Name"), // Required
// More values...
},
RulesPackageArns: []*string{
aws.String("Arn"), // Required
// More values...
},
Severities: []*string{
aws.String("Severity"), // Required
// More values...
},
UserAttributes: []*inspector.Attribute{
{ // Required
Key: aws.String("AttributeKey"),
Value: aws.String("AttributeValue"),
},
// More values...
},
},
MaxResults: aws.Int64(1),
NextToken: aws.String("PaginationToken"),
RunArns: []*string{
aws.String("Arn"), // Required
// More values...
},
}
resp, err := svc.ListFindings(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,代码行数:51,代码来源:examples_test.go
示例7: ExampleInspector_DescribeCrossAccountAccessRole
func ExampleInspector_DescribeCrossAccountAccessRole() {
svc := inspector.New(nil)
var params *inspector.DescribeCrossAccountAccessRoleInput
resp, err := svc.DescribeCrossAccountAccessRole(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
示例8: ExampleInspector_ListAssessments
func ExampleInspector_ListAssessments() {
svc := inspector.New(nil)
params := &inspector.ListAssessmentsInput{
ApplicationArns: []*string{
aws.String("Arn"), // Required
// More values...
},
Filter: &inspector.AssessmentsFilter{
AssessmentNamePatterns: []*string{
aws.String("NamePattern"), // Required
// More values...
},
AssessmentStates: []*string{
aws.String("AssessmentState"), // Required
// More values...
},
DataCollected: aws.Bool(true),
DurationRange: &inspector.DurationRange{
Maximum: aws.Int64(1),
Minimum: aws.Int64(1),
},
EndTimeRange: &inspector.TimestampRange{
Maximum: aws.Time(time.Now()),
Minimum: aws.Time(time.Now()),
},
StartTimeRange: &inspector.TimestampRange{
Maximum: aws.Time(time.Now()),
Minimum: aws.Time(time.Now()),
},
},
MaxResults: aws.Int64(1),
NextToken: aws.String("PaginationToken"),
}
resp, err := svc.ListAssessments(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,代码行数:46,代码来源:examples_test.go
示例9: ExampleInspector_ListRuns
func ExampleInspector_ListRuns() {
svc := inspector.New(nil)
params := &inspector.ListRunsInput{
AssessmentArns: []*string{
aws.String("Arn"), // Required
// More values...
},
Filter: &inspector.RunsFilter{
CompletionTime: &inspector.TimestampRange{
Maximum: aws.Time(time.Now()),
Minimum: aws.Time(time.Now()),
},
CreationTime: &inspector.TimestampRange{
Maximum: aws.Time(time.Now()),
Minimum: aws.Time(time.Now()),
},
RulesPackages: []*string{
aws.String("Arn"), // Required
// More values...
},
RunNamePatterns: []*string{
aws.String("NamePattern"), // Required
// More values...
},
RunStates: []*string{
aws.String("RunState"), // Required
// More values...
},
},
MaxResults: aws.Int64(1),
NextToken: aws.String("PaginationToken"),
}
resp, err := svc.ListRuns(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,代码行数:45,代码来源:examples_test.go
示例10: ExampleInspector_RegisterCrossAccountAccessRole
func ExampleInspector_RegisterCrossAccountAccessRole() {
svc := inspector.New(nil)
params := &inspector.RegisterCrossAccountAccessRoleInput{
RoleArn: aws.String("Arn"),
}
resp, err := svc.RegisterCrossAccountAccessRole(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
示例11: ExampleInspector_ListTagsForResource
func ExampleInspector_ListTagsForResource() {
svc := inspector.New(nil)
params := &inspector.ListTagsForResourceInput{
ResourceArn: aws.String("Arn"),
}
resp, err := svc.ListTagsForResource(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
示例12: ExampleInspector_DescribeRun
func ExampleInspector_DescribeRun() {
svc := inspector.New(nil)
params := &inspector.DescribeRunInput{
RunArn: aws.String("Arn"),
}
resp, err := svc.DescribeRun(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
示例13: ExampleInspector_StopDataCollection
func ExampleInspector_StopDataCollection() {
svc := inspector.New(nil)
params := &inspector.StopDataCollectionInput{
AssessmentArn: aws.String("Arn"),
}
resp, err := svc.StopDataCollection(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
示例14: ExampleInspector_CreateResourceGroup
func ExampleInspector_CreateResourceGroup() {
svc := inspector.New(nil)
params := &inspector.CreateResourceGroupInput{
ResourceGroupTags: aws.String("ResourceGroupTags"),
}
resp, err := svc.CreateResourceGroup(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
示例15: ExampleInspector_ListRulesPackages
func ExampleInspector_ListRulesPackages() {
svc := inspector.New(nil)
params := &inspector.ListRulesPackagesInput{
MaxResults: aws.Int64(1),
NextToken: aws.String("PaginationToken"),
}
resp, err := svc.ListRulesPackages(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
示例16: ExampleInspector_AttachAssessmentAndRulesPackage
func ExampleInspector_AttachAssessmentAndRulesPackage() {
svc := inspector.New(nil)
params := &inspector.AttachAssessmentAndRulesPackageInput{
AssessmentArn: aws.String("Arn"),
RulesPackageArn: aws.String("Arn"),
}
resp, err := svc.AttachAssessmentAndRulesPackage(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
示例17: ExampleInspector_CreateApplication
func ExampleInspector_CreateApplication() {
svc := inspector.New(nil)
params := &inspector.CreateApplicationInput{
ApplicationName: aws.String("Name"),
ResourceGroupArn: aws.String("Arn"),
}
resp, err := svc.CreateApplication(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
示例18: ExampleInspector_UpdateAssessment
func ExampleInspector_UpdateAssessment() {
svc := inspector.New(nil)
params := &inspector.UpdateAssessmentInput{
AssessmentArn: aws.String("Arn"),
AssessmentName: aws.String("Name"),
DurationInSeconds: aws.Int64(1),
}
resp, err := svc.UpdateAssessment(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
示例19: ExampleInspector_PreviewAgentsForResourceGroup
func ExampleInspector_PreviewAgentsForResourceGroup() {
svc := inspector.New(nil)
params := &inspector.PreviewAgentsForResourceGroupInput{
MaxResults: aws.Int64(1),
NextToken: aws.String("PaginationToken"),
ResourceGroupArn: aws.String("Arn"),
}
resp, err := svc.PreviewAgentsForResourceGroup(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
示例20: TestInterface
func TestInterface(t *testing.T) {
assert.Implements(t, (*inspectoriface.InspectorAPI)(nil), inspector.New(nil))
}
开发者ID:nehadhamija,项目名称:aws-sdk-go,代码行数:3,代码来源:interface_test.go
注:本文中的github.com/upstartmobile/aws-sdk-go/service/inspector.New函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论