• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Golang servicecatalog.New函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Golang中github.com/aws/aws-sdk-go/service/servicecatalog.New函数的典型用法代码示例。如果您正苦于以下问题:Golang New函数的具体用法?Golang New怎么用?Golang New使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了New函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。

示例1: ExampleServiceCatalog_RejectPortfolioShare

func ExampleServiceCatalog_RejectPortfolioShare() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := servicecatalog.New(sess)

	params := &servicecatalog.RejectPortfolioShareInput{
		PortfolioId:    aws.String("Id"), // Required
		AcceptLanguage: aws.String("AcceptLanguage"),
	}
	resp, err := svc.RejectPortfolioShare(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:realestate-com-au,项目名称:shush,代码行数:25,代码来源:examples_test.go


示例2: ExampleServiceCatalog_CreateConstraint

func ExampleServiceCatalog_CreateConstraint() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := servicecatalog.New(sess)

	params := &servicecatalog.CreateConstraintInput{
		IdempotencyToken: aws.String("IdempotencyToken"),     // Required
		Parameters:       aws.String("ConstraintParameters"), // Required
		PortfolioId:      aws.String("Id"),                   // Required
		ProductId:        aws.String("Id"),                   // Required
		Type:             aws.String("ConstraintType"),       // Required
		AcceptLanguage:   aws.String("AcceptLanguage"),
		Description:      aws.String("ConstraintDescription"),
	}
	resp, err := svc.CreateConstraint(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:realestate-com-au,项目名称:shush,代码行数:30,代码来源:examples_test.go


示例3: ExampleServiceCatalog_ListRecordHistory

func ExampleServiceCatalog_ListRecordHistory() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := servicecatalog.New(sess)

	params := &servicecatalog.ListRecordHistoryInput{
		AcceptLanguage: aws.String("AcceptLanguage"),
		AccessLevelFilter: &servicecatalog.AccessLevelFilter{
			Key:   aws.String("AccessLevelFilterKey"),
			Value: aws.String("AccessLevelFilterValue"),
		},
		PageSize:  aws.Int64(1),
		PageToken: aws.String("PageToken"),
		SearchFilter: &servicecatalog.ListRecordHistorySearchFilter{
			Key:   aws.String("SearchFilterKey"),
			Value: aws.String("SearchFilterValue"),
		},
	}
	resp, err := svc.ListRecordHistory(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:realestate-com-au,项目名称:shush,代码行数:34,代码来源:examples_test.go


示例4: ExampleServiceCatalog_DescribeProvisioningParameters

func ExampleServiceCatalog_DescribeProvisioningParameters() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := servicecatalog.New(sess)

	params := &servicecatalog.DescribeProvisioningParametersInput{
		ProductId:              aws.String("Id"), // Required
		ProvisioningArtifactId: aws.String("Id"), // Required
		AcceptLanguage:         aws.String("AcceptLanguage"),
		PathId:                 aws.String("Id"),
	}
	resp, err := svc.DescribeProvisioningParameters(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:realestate-com-au,项目名称:shush,代码行数:27,代码来源:examples_test.go


示例5: ExampleServiceCatalog_ListPrincipalsForPortfolio

func ExampleServiceCatalog_ListPrincipalsForPortfolio() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := servicecatalog.New(sess)

	params := &servicecatalog.ListPrincipalsForPortfolioInput{
		PortfolioId:    aws.String("Id"), // Required
		AcceptLanguage: aws.String("AcceptLanguage"),
		PageSize:       aws.Int64(1),
		PageToken:      aws.String("PageToken"),
	}
	resp, err := svc.ListPrincipalsForPortfolio(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:realestate-com-au,项目名称:shush,代码行数:27,代码来源:examples_test.go


示例6: ExampleServiceCatalog_CreatePortfolio

func ExampleServiceCatalog_CreatePortfolio() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := servicecatalog.New(sess)

	params := &servicecatalog.CreatePortfolioInput{
		DisplayName:      aws.String("PortfolioDisplayName"), // Required
		IdempotencyToken: aws.String("IdempotencyToken"),     // Required
		ProviderName:     aws.String("ProviderName"),         // Required
		AcceptLanguage:   aws.String("AcceptLanguage"),
		Description:      aws.String("PortfolioDescription"),
		Tags: []*servicecatalog.Tag{
			{ // Required
				Key:   aws.String("TagKey"),   // Required
				Value: aws.String("TagValue"), // Required
			},
			// More values...
		},
	}
	resp, err := svc.CreatePortfolio(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:realestate-com-au,项目名称:shush,代码行数:35,代码来源:examples_test.go


示例7: ExampleServiceCatalog_CreateProvisioningArtifact

func ExampleServiceCatalog_CreateProvisioningArtifact() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := servicecatalog.New(sess)

	params := &servicecatalog.CreateProvisioningArtifactInput{
		IdempotencyToken: aws.String("IdempotencyToken"), // Required
		Parameters: &servicecatalog.ProvisioningArtifactProperties{ // Required
			Info: map[string]*string{ // Required
				"Key": aws.String("ProvisioningArtifactInfoValue"), // Required
				// More values...
			},
			Description: aws.String("ProvisioningArtifactDescription"),
			Name:        aws.String("ProvisioningArtifactName"),
			Type:        aws.String("ProvisioningArtifactType"),
		},
		ProductId:      aws.String("Id"), // Required
		AcceptLanguage: aws.String("AcceptLanguage"),
	}
	resp, err := svc.CreateProvisioningArtifact(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:realestate-com-au,项目名称:shush,代码行数:35,代码来源:examples_test.go


示例8: ExampleServiceCatalog_TerminateProvisionedProduct

func ExampleServiceCatalog_TerminateProvisionedProduct() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := servicecatalog.New(sess)

	params := &servicecatalog.TerminateProvisionedProductInput{
		TerminateToken:         aws.String("IdempotencyToken"), // Required
		AcceptLanguage:         aws.String("AcceptLanguage"),
		IgnoreErrors:           aws.Bool(true),
		ProvisionedProductId:   aws.String("Id"),
		ProvisionedProductName: aws.String("ProvisionedProductNameOrArn"),
	}
	resp, err := svc.TerminateProvisionedProduct(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:realestate-com-au,项目名称:shush,代码行数:28,代码来源:examples_test.go


示例9: ExampleServiceCatalog_SearchProducts

func ExampleServiceCatalog_SearchProducts() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := servicecatalog.New(sess)

	params := &servicecatalog.SearchProductsInput{
		AcceptLanguage: aws.String("AcceptLanguage"),
		Filters: map[string][]*string{
			"Key": { // Required
				aws.String("ProductViewFilterValue"), // Required
				// More values...
			},
			// More values...
		},
		PageSize:  aws.Int64(1),
		PageToken: aws.String("PageToken"),
		SortBy:    aws.String("ProductViewSortBy"),
		SortOrder: aws.String("SortOrder"),
	}
	resp, err := svc.SearchProducts(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:realestate-com-au,项目名称:shush,代码行数:35,代码来源:examples_test.go


示例10: ExampleServiceCatalog_UpdateProvisionedProduct

func ExampleServiceCatalog_UpdateProvisionedProduct() {
	svc := servicecatalog.New(session.New())

	params := &servicecatalog.UpdateProvisionedProductInput{
		UpdateToken:            aws.String("IdempotencyToken"), // Required
		AcceptLanguage:         aws.String("AcceptLanguage"),
		PathId:                 aws.String("Id"),
		ProductId:              aws.String("Id"),
		ProvisionedProductId:   aws.String("Id"),
		ProvisionedProductName: aws.String("ProvisionedProductNameOrArn"),
		ProvisioningArtifactId: aws.String("Id"),
		ProvisioningParameters: []*servicecatalog.UpdateProvisioningParameter{
			{ // Required
				Key:              aws.String("ParameterKey"),
				UsePreviousValue: aws.Bool(true),
				Value:            aws.String("ParameterValue"),
			},
			// More values...
		},
	}
	resp, err := svc.UpdateProvisionedProduct(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:ColourboxDevelopment,项目名称:aws-sdk-go,代码行数:32,代码来源:examples_test.go


示例11: ExampleServiceCatalog_ScanProvisionedProducts

func ExampleServiceCatalog_ScanProvisionedProducts() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := servicecatalog.New(sess)

	params := &servicecatalog.ScanProvisionedProductsInput{
		AcceptLanguage: aws.String("AcceptLanguage"),
		PageSize:       aws.Int64(1),
		PageToken:      aws.String("PageToken"),
	}
	resp, err := svc.ScanProvisionedProducts(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:roman-vynar,项目名称:grafana,代码行数:26,代码来源:examples_test.go


示例12: ExampleServiceCatalog_ProvisionProduct

func ExampleServiceCatalog_ProvisionProduct() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := servicecatalog.New(sess)

	params := &servicecatalog.ProvisionProductInput{
		ProductId:              aws.String("Id"),                     // Required
		ProvisionToken:         aws.String("IdempotencyToken"),       // Required
		ProvisionedProductName: aws.String("ProvisionedProductName"), // Required
		ProvisioningArtifactId: aws.String("Id"),                     // Required
		AcceptLanguage:         aws.String("AcceptLanguage"),
		NotificationArns: []*string{
			aws.String("NotificationArn"), // Required
			// More values...
		},
		PathId: aws.String("Id"),
		ProvisioningParameters: []*servicecatalog.ProvisioningParameter{
			{ // Required
				Key:   aws.String("ParameterKey"),
				Value: aws.String("ParameterValue"),
			},
			// More values...
		},
		Tags: []*servicecatalog.Tag{
			{ // Required
				Key:   aws.String("TagKey"),   // Required
				Value: aws.String("TagValue"), // Required
			},
			// More values...
		},
	}
	resp, err := svc.ProvisionProduct(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:realestate-com-au,项目名称:shush,代码行数:47,代码来源:examples_test.go


示例13: ExampleServiceCatalog_UpdateProduct

func ExampleServiceCatalog_UpdateProduct() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := servicecatalog.New(sess)

	params := &servicecatalog.UpdateProductInput{
		Id:             aws.String("Id"), // Required
		AcceptLanguage: aws.String("AcceptLanguage"),
		AddTags: []*servicecatalog.Tag{
			{ // Required
				Key:   aws.String("TagKey"),   // Required
				Value: aws.String("TagValue"), // Required
			},
			// More values...
		},
		Description: aws.String("ProductViewShortDescription"),
		Distributor: aws.String("ProductViewOwner"),
		Name:        aws.String("ProductViewName"),
		Owner:       aws.String("ProductViewOwner"),
		RemoveTags: []*string{
			aws.String("TagKey"), // Required
			// More values...
		},
		SupportDescription: aws.String("SupportDescription"),
		SupportEmail:       aws.String("SupportEmail"),
		SupportUrl:         aws.String("SupportUrl"),
	}
	resp, err := svc.UpdateProduct(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:realestate-com-au,项目名称:shush,代码行数:43,代码来源:examples_test.go


示例14: ExampleServiceCatalog_DescribeProductView

func ExampleServiceCatalog_DescribeProductView() {
	svc := servicecatalog.New(session.New())

	params := &servicecatalog.DescribeProductViewInput{
		Id:             aws.String("Id"), // Required
		AcceptLanguage: aws.String("AcceptLanguage"),
	}
	resp, err := svc.DescribeProductView(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:ColourboxDevelopment,项目名称:aws-sdk-go,代码行数:19,代码来源:examples_test.go


示例15: ExampleServiceCatalog_ListLaunchPaths

func ExampleServiceCatalog_ListLaunchPaths() {
	svc := servicecatalog.New(session.New())

	params := &servicecatalog.ListLaunchPathsInput{
		ProductId:      aws.String("Id"), // Required
		AcceptLanguage: aws.String("AcceptLanguage"),
		PageSize:       aws.Int64(1),
		PageToken:      aws.String("PageToken"),
	}
	resp, err := svc.ListLaunchPaths(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:ColourboxDevelopment,项目名称:aws-sdk-go,代码行数:21,代码来源:examples_test.go



注:本文中的github.com/aws/aws-sdk-go/service/servicecatalog.New函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Golang ses.New函数代码示例发布时间:2022-05-24
下一篇:
Golang s3manager.UploadInput类代码示例发布时间:2022-05-24
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap