CreateProfileCommand

Creates a customer profile. You can have up to five customer profiles, each representing a distinct private network. A profile is the mechanism used to create the concept of a private network.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { B2biClient, CreateProfileCommand } from "@aws-sdk/client-b2bi"; // ES Modules import
// const { B2biClient, CreateProfileCommand } = require("@aws-sdk/client-b2bi"); // CommonJS import
const client = new B2biClient(config);
const input = { // CreateProfileRequest
  name: "STRING_VALUE", // required
  email: "STRING_VALUE",
  phone: "STRING_VALUE", // required
  businessName: "STRING_VALUE", // required
  logging: "ENABLED" || "DISABLED", // required
  clientToken: "STRING_VALUE",
  tags: [ // TagList
    { // Tag
      Key: "STRING_VALUE", // required
      Value: "STRING_VALUE", // required
    },
  ],
};
const command = new CreateProfileCommand(input);
const response = await client.send(command);
// { // CreateProfileResponse
//   profileId: "STRING_VALUE", // required
//   profileArn: "STRING_VALUE", // required
//   name: "STRING_VALUE", // required
//   businessName: "STRING_VALUE", // required
//   phone: "STRING_VALUE", // required
//   email: "STRING_VALUE",
//   logging: "ENABLED" || "DISABLED",
//   logGroupName: "STRING_VALUE",
//   createdAt: new Date("TIMESTAMP"), // required
// };

Example Usage

 Loading code editor

CreateProfileCommand Input

See CreateProfileCommandInput for more details

Parameter
Type
Description
businessName
Required
string | undefined

Specifies the name for the business associated with this profile.

logging
Required
Logging | undefined

Specifies whether or not logging is enabled for this profile.

name
Required
string | undefined

Specifies the name of the profile.

phone
Required
string | undefined

Specifies the phone number associated with the profile.

clientToken
string | undefined

Reserved for future use.

email
string | undefined

Specifies the email address associated with this customer profile.

tags
Tag[] | undefined

Specifies the key-value pairs assigned to ARNs that you can use to group and search for resources by type. You can attach this metadata to resources (capabilities, partnerships, and so on) for any purpose.

CreateProfileCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
businessName
Required
string | undefined

Returns the name for the business associated with this profile.

createdAt
Required
Date | undefined

Returns a timestamp representing the time the profile was created.

name
Required
string | undefined

Returns the name of the profile, used to identify it.

phone
Required
string | undefined

Returns the phone number associated with the profile.

profileArn
Required
string | undefined

Returns an Amazon Resource Name (ARN) for the profile.

profileId
Required
string | undefined

Returns the unique, system-generated identifier for the profile.

email
string | undefined

Returns the email address associated with this customer profile.

logGroupName
string | undefined

Returns the name of the logging group.

logging
Logging | undefined

Returns whether or not logging is turned on for this profile.

Throws

Name
Fault
Details
AccessDeniedException
client

You do not have sufficient access to perform this action.

ConflictException
client

A conflict exception is thrown when you attempt to delete a resource (such as a profile or a capability) that is being used by other resources.

InternalServerException
server

This exception is thrown when an error occurs in the Amazon Web Services B2B Data Interchange service.

ResourceNotFoundException
client

Occurs when the requested resource does not exist, or cannot be found. In some cases, the resource exists in a region other than the region specified in the API call.

ServiceQuotaExceededException
client

Occurs when the calling command attempts to exceed one of the service quotas, for example trying to create a capability when you already have the maximum number of capabilities allowed.

ThrottlingException
client

The request was denied due to throttling: the data speed and rendering may be limited depending on various parameters and conditions.

ValidationException
client

Occurs when a B2BI object cannot be validated against a request from another object.

B2biServiceException
Base exception class for all service exceptions from B2bi service.