create_partnership
async
¶
create_partnership(
profile_id: ProfileId,
name: PartnerName,
email: Email,
capabilities: PartnershipCapabilities,
*,
config_overrides: Optional[Asyncb2biClientConfig] = None,
phone: Optional[Phone] = None,
capability_options: Optional[CapabilityOptions] = None,
client_token: Optional[str] = None,
tags: Optional[TagList] = None,
) -> CreatePartnershipResponse
Creates a partnership between a customer and a trading partner, based on the supplied parameters. A partnership represents the connection between you and your trading partner. It ties together a profile and one or more trading capabilities.
Parameters:
-
profile_id(ProfileId) –Specifies the unique, system-generated identifier for the profile connected to this partnership.
-
name(PartnerName) –Specifies a descriptive name for the partnership.
-
email(Email) –Specifies the email address associated with this trading partner.
-
phone(Optional[Phone], default:None) –Specifies the phone number associated with the partnership.
-
capabilities(PartnershipCapabilities) –Specifies a list of the capabilities associated with this partnership.
-
capability_options(Optional[CapabilityOptions], default:None) –Specify the structure that contains the details for the associated capabilities.
-
client_token(Optional[str], default:None) –Reserved for future use.
-
tags(Optional[TagList], default:None) –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.
Raises:
-
AccessDeniedException–You do not have sufficient access to perform this action.
-
ConflictException–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–This exception is thrown when an error occurs in the Amazon Web Services B2B Data Interchange service.
-
ResourceNotFoundException–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–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–The request was denied due to throttling: the data speed and rendering may be limited depending on various parameters and conditions.
-
ValidationException–Occurs when a B2BI object cannot be validated against a request from another object. This exception can be thrown during standard EDI validation or when custom validation rules fail, such as when element length constraints are violated, invalid codes are used in code list validations, or required elements are missing based on configured element requirement rules.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
Sample CreatePartnership call
>>> await client.create_partnership(capabilities=['ca-963a8121e4fc4e348'], client_token='foo', email='[email protected]', name='b2bipartner', phone='5555555555', profile_id='p-60fbc37c87f04fce9', tags=[{'Key': 'sampleKey1', 'Value': 'sampleValue1'}])
Source code in docs_src/capo_b2bi/_services/async_b2bi.py
1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 | |