func ExampleCloudHSM_CreateHsm() { svc := cloudhsm.New(session.New()) params := &cloudhsm.CreateHsmInput{ IamRoleArn: aws.String("IamRoleArn"), // Required SshKey: aws.String("SshKey"), // Required SubnetId: aws.String("SubnetId"), // Required SubscriptionType: aws.String("SubscriptionType"), // Required ClientToken: aws.String("ClientToken"), EniIp: aws.String("IpAddress"), ExternalId: aws.String("ExternalId"), SyslogIp: aws.String("IpAddress"), } resp, err := svc.CreateHsm(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 ExampleCloudHSM_ListAvailableZones() { svc := cloudhsm.New(session.New()) var params *cloudhsm.ListAvailableZonesInput resp, err := svc.ListAvailableZones(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 ExampleCloudHSM_DeleteHapg() { svc := cloudhsm.New(session.New()) params := &cloudhsm.DeleteHapgInput{ HapgArn: aws.String("HapgArn"), // Required } resp, err := svc.DeleteHapg(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 ExampleCloudHSM_ListLunaClients() { svc := cloudhsm.New(session.New()) params := &cloudhsm.ListLunaClientsInput{ NextToken: aws.String("PaginationToken"), } resp, err := svc.ListLunaClients(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 ExampleCloudHSM_CreateLunaClient() { svc := cloudhsm.New(session.New()) params := &cloudhsm.CreateLunaClientInput{ Certificate: aws.String("Certificate"), // Required Label: aws.String("ClientLabel"), } resp, err := svc.CreateLunaClient(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 ExampleCloudHSM_DescribeLunaClient() { svc := cloudhsm.New(session.New()) params := &cloudhsm.DescribeLunaClientInput{ CertificateFingerprint: aws.String("CertificateFingerprint"), ClientArn: aws.String("ClientArn"), } resp, err := svc.DescribeLunaClient(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 ExampleCloudHSM_DescribeHsm() { svc := cloudhsm.New(session.New()) params := &cloudhsm.DescribeHsmInput{ HsmArn: aws.String("HsmArn"), HsmSerialNumber: aws.String("HsmSerialNumber"), } resp, err := svc.DescribeHsm(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 ExampleCloudHSM_ModifyHsm() { svc := cloudhsm.New(session.New()) params := &cloudhsm.ModifyHsmInput{ HsmArn: aws.String("HsmArn"), // Required EniIp: aws.String("IpAddress"), ExternalId: aws.String("ExternalId"), IamRoleArn: aws.String("IamRoleArn"), SubnetId: aws.String("SubnetId"), SyslogIp: aws.String("IpAddress"), } resp, err := svc.ModifyHsm(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 ExampleCloudHSM_ModifyHapg() { svc := cloudhsm.New(session.New()) params := &cloudhsm.ModifyHapgInput{ HapgArn: aws.String("HapgArn"), // Required Label: aws.String("Label"), PartitionSerialList: []*string{ aws.String("PartitionSerial"), // Required // More values... }, } resp, err := svc.ModifyHapg(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 ExampleCloudHSM_GetConfig() { svc := cloudhsm.New(session.New()) params := &cloudhsm.GetConfigInput{ ClientArn: aws.String("ClientArn"), // Required ClientVersion: aws.String("ClientVersion"), // Required HapgList: []*string{ // Required aws.String("HapgArn"), // Required // More values... }, } resp, err := svc.GetConfig(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 init() { Before("@cloudhsm", func() { World["client"] = cloudhsm.New(smoke.Session) }) }